Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Small Display Bug after Update to SS 3.1.2


Go to End
Reply


10 Posts   1255 Views

Avatar
cSGermany

Community Member, 37 Posts

27 November 2013 at 3:53am

Hi,

I found a small display error if you use the backend in german language.

If you right click a page in the page tree, "show children as list" and "duplicate" are not shown. There are just blank fields.

I attached a screenshot.

This Bug appears after upgrading from 3.1.1 to 3.1.2 and also on a new installation with 3.1.2

Is this an SS Bug or my fault?
How can i fix it?

Best Regards

Attached Files
Avatar
DirtyHarri

Community Member, 8 Posts

29 November 2013 at 6:46am

Hi,

I have the same problem here, but with a 3.1.x-dev environment. I tested the 3.1.2 release as well and with the same problem. So I would assume that this is not your fault!

But thank you for pointing out that this is a problem with the german language pack only. So I can use english in the meantime until the problem is fixed.

Best regards,
Andreas.

Avatar
DirtyHarri

Community Member, 8 Posts

29 November 2013 at 8:24am

Hi again...

I made some crude hacking into the language files:

cms/javascript/lang/de.js

I just added the "Tree.*" lines from the en.js file to the end (watch out for the comma...) and now the menuitems are back (in english, but even in 3.1.1. they were not translated.

The funny thing is that in 3.1.1. it worked without these lines...

I would expect that, if a translation is not available, the original english terms would be used. But this seems to have changed in some parts of the code.

There are some more translations missing, but I think that they show up in english instead of "dissapearing".

Hope that someone will have a look at the handling of the language files and fix this.

Regards,
Andreas.

--- snipp ---
/ This file was generated by GenerateJavaScriptI18nTask from javascript/lang/src/de.js.
// See https://github.com/silverstripe/silverstripe-buildtools for details
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
   if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
} else {
   ss.i18n.addDictionary('de', {
   "CMSMAIN.WARNINGSAVEPAGESBEFOREADDING" : "Sie müssen diese Seite speichern bevor Unterseiten hingefügt werden können",
   "CMSMAIN.CANTADDCHILDREN" : "Unterseiten nicht erlaubt",
   "CMSMAIN.ERRORADDINGPAGE" : "Fehler beim Hinzufügen der Seite",
   "CMSMAIN.FILTEREDTREE" : "Gefilterter Seitenbaum zeigt nur Änderungen",
   "CMSMAIN.ERRORFILTERPAGES" : "Konnte Seitenbaum nicht filtern<br />%s",
   "CMSMAIN.ERRORUNFILTER" : "Konnte Filterung des Seitenbaumes nicht aufheben<br />%s",
   "CMSMAIN.PUBLISHINGPAGES" : "Publiziere Seiten...",
   "CMSMAIN.SELECTONEPAGE" : "Bitte mindestens eine Seite auswählen",
   "CMSMAIN.ERRORPUBLISHING" : "Fehler beim Veröffentlichen der Seiten",
   "CMSMAIN.REALLYDELETEPAGES" : "Wollen Sie wirklich %s Seiten löschen?",
   "CMSMAIN.DELETINGPAGES" : "Lösche Seiten...",
   "CMSMAIN.ERRORDELETINGPAGES": "Fehler beim Löschen der Seiten",
   "CMSMAIN.PUBLISHING" : "Veröffentliche...",
   "CMSMAIN.RESTORING": "Wiederherstellen...",
   "CMSMAIN.ERRORREVERTING": "Fehler beim Wiederherstellen des Live-Inhaltes",
   "CMSMAIN.SAVING" : "Sichern...",
   "CMSMAIN.SELECTMOREPAGES" : "Sie haben %s Seiten ausgewählt.\n\nWollen Sie wirklich diese Aktion durchführen?",
   "Tree.AddSubPage": "Add new page here",
   "Tree.Duplicate": "Duplicate",
   "Tree.EditPage": "Edit",
   "Tree.ThisPageOnly": "This page only",
   "Tree.ThisPageAndSubpages": "This page and subpages",
   "Tree.ShowAsList": "Show children as list"
});
--- snipp ---

Attached Files
Avatar
DirtyHarri

Community Member, 8 Posts

29 November 2013 at 7:40pm

Hello,

the problem is within the file cms/javascript/CMSMain.Tree.js

The menuitem "edit page", which works with the german languange setting, is defined there as:
'label': ss.i18n._t('Tree.EditPage', 'Edit page', 100, 'Used in the context menu when right-clicking on a page node in the CMS tree'),

There is the system name for the message "Tree.EditPage" together with a default string "Edit page" (and an explanation). However the other entries somehow lost there default string which means that they have to be included mandatory in the languange files.

'label': ss.i18n._t('Tree.Duplicate'),

I believe it is not a good practise to ommit the default string when looking for a translation...

I will have a look at the file in version 3.1.1 to see what they looked like before the update. But at the moment I have no idea on how to submit changes to the file (and possible the language file) back to the developers.

Regards,
Andreas.

Avatar
camfindlay

Forum Moderator, 188 Posts

30 November 2013 at 10:06am

Edited: 30/11/2013 10:07am

Hey Andreas,

The best starting point for reporting bugs is to head over to the CMS github repository and search through the "issues" to see if others have had the asme problem. If you think you have found something new please submit a bug ticket. There is some good information at
[url]http://doc.silverstripe.org/framework/en/trunk/misc/contributing/issues[/url]
which goes into how to create a useful and well detailed bug report.

If you are felling more adventurous and want to contribute code back to SilverStripe also checkout this in the documentation: [url]http://doc.silverstripe.org/framework/en/trunk/misc/contributing/code[/url]

Cam

Avatar
DirtyHarri

Community Member, 8 Posts

1 December 2013 at 12:41am

Hello Cam!

thank you for the two links, I think that they are very usefull, especially the second one about contribution to the project.

I will have a closer look to that information and will test a little more before reporting the bug.

Regards,
Andreas.

Avatar
DirtyHarri

Community Member, 8 Posts

2 December 2013 at 6:09am

Hello,

I made some changes and submitted a "pull request":
https://github.com/silverstripe/silverstripe-framework/pull/2701

This will change the behavior of the system back to its old behavior.

Hopefully the developers will either take this solution or revert the underlying changes (short names for some of the locale files) back.

Regards,
Andreas.

Avatar
dacar

Community Member, 168 Posts

3 December 2013 at 8:43pm

Hi,

cms/javascript/lang/de.js is incomplete. Maybe in other language files, too.
The following solved the Problem for the german translations:

if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
   console.error('Class ss.i18n not defined');
} else {
   ss.i18n.addDictionary('de_DE', {
      'CMSMAIN.WARNINGSAVEPAGESBEFOREADDING' : "Sie müssen diese Seite speichern bevor Unterseiten hingefügt werden können",
      'CMSMAIN.CANTADDCHILDREN' : "Unterseiten nicht erlaubt",
      'CMSMAIN.ERRORADDINGPAGE' : 'Fehler beim Hinzufügen der Seite',
      'CMSMAIN.FILTEREDTREE' : 'Gefilterter Seitenbaum zeigt nur Änderungen',
      'CMSMAIN.ERRORFILTERPAGES' : 'Konnte Seitenbaum nicht filtern<br />%s',
      'CMSMAIN.ERRORUNFILTER' : 'Konnte Filterung des Seitenbaumes nicht aufheben<br />%s',
      'CMSMAIN.PUBLISHINGPAGES' : 'Publiziere Seiten...',
      'CMSMAIN.SELECTONEPAGE' : "Bitte mindestens eine Seite auswählen",
      'CMSMAIN.ERRORPUBLISHING' : 'Fehler beim Veröffentlichen der Seiten',
      'CMSMAIN.REALLYDELETEPAGES' : "Wollen Sie wirklich %s Seiten löschen?",
      'CMSMAIN.DELETINGPAGES' : 'Lösche Seiten...',
      'CMSMAIN.ERRORDELETINGPAGES': 'Fehler beim Löschen der Seiten',
      'CMSMAIN.PUBLISHING' : 'Veröffentliche...',
      'CMSMAIN.RESTORING': 'Wiederherstellen...',
      'CMSMAIN.ERRORREVERTING': 'Fehler beim Wiederherstellen des Live-Inhaltes',
      'CMSMAIN.SAVING' : 'Sichern...',
      'CMSMAIN.SELECTMOREPAGES' : "Sie haben %s Seiten ausgewählt.\n\nWollen Sie wirklich diese Aktion durchführen?",
      'CMSMAIN.ALERTCLASSNAME': 'Der Seitentyp wird geändert, nachdem die Seite veröffentlicht wurde',
      'CMSMAIN.URLSEGMENTVALIDATION': 'URLs können nur aus Buchstaben, Zahlen und Bindestrichen bestehen.',
      'AssetAdmin.BATCHACTIONSDELETECONFIRM': "Wollen Sie wirklich das Verzeichnis %s löschen?",
      'AssetTableField.REALLYDELETE': 'Wollen Sie die markierten Dateien wirklich löschen?',
      'AssetTableField.MOVING': '%s Datei(en) verschieben',
      'CMSMAIN.AddSearchCriteria': 'Add Criteria',
      'WidgetAreaEditor.TOOMANY': 'Sorry, Sie haben die maximale Anzahl an Widgets für diesen Bereich erreicht.',
      'AssetAdmin.ConfirmDelete': 'Wollen Sie wirklich dieses Verzeichnis und alle Dateien in dem Verzeichnis löschen?',
      'Folder.Name': 'Verzsichnisname',
      'Tree.AddSubPage': 'Neue Seite hier einfügen',
      'Tree.Duplicate': 'dupilizieren',
      'Tree.EditPage': 'bearbeiten',
      'Tree.ThisPageOnly': 'Nur diese Seite',
      'Tree.ThisPageAndSubpages': 'Diese Seite und alle Unterseiten',
      'Tree.ShowAsList': 'Unterseiten als Liste zeigen',
      'CMSMain.ConfirmRestoreFromLive': "Sollen die veröffentlichten Seiten wirklich zu den Entwurfsseiten kopiert werden?Do you really want to copy the published content to the draft site?",
      'CMSMain.RollbackToVersion': "Wollen Sie wircklich zur Version #%s dieser Seite zurückkehren?",
      'URLSEGMENT.Edit': 'bearbeiten',
      'URLSEGMENT.OK': 'OK',
      'URLSEGMENT.Cancel': 'abbrechen'
   });
}

Go to Top