-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout Editor i18n #1828
Layout Editor i18n #1828
Conversation
Beans Turnout/Sensor/Light/Block etc. ButtonEdit/ButtonCancel
Use NBB key in LayoutEditor with if/else to keep name/type value intact Comment duplicate keys in LE Bundle Move existing translations to NBB
Fix Multisensor property value \n
use existing bundle keys for OK etc. Fix Positionable Item Edit Dialog button bundle names
spelling errors stray copies from other Bundles
move ButtonSet to jmri.NBB to be found
Clean up DisplayBundle Clean up SpeedProfile Bundle button keys and error string Move some keys to NBB Clean up Maintenance strings Fix BlockContentsIcon to use existing NBB keys Mark NOI18N places
Fix ellipsis in Panel popup menus (only when a input dialog follows, never in pane title)
Move File/Edit menu keys to NBB, fix method to retrieve File menu in LE Add spacing to LE icon popup menus Text clean up of AppsBundle headers
# Conflicts solved: # java/src/apps/AppsBundle_de.properties # java/src/jmri/ConditionalVariable.java # java/src/jmri/NamedBeanBundle_ja_JP.properties # java/src/jmri/jmrit/Bundle_da.properties # java/src/jmri/jmrit/Bundle_it.properties # java/src/jmri/jmrit/beantable/BeanTableBundle_ca.properties # java/src/jmri/jmrit/beantable/BeanTableBundle_de.properties # java/src/jmri/jmrit/display/DisplayBundle.properties # java/src/jmri/jmrit/display/DisplayBundle_da.properties # java/src/jmri/jmrit/display/DisplayBundle_fr.properties # java/src/jmri/jmrit/display/DisplayBundle_it.properties # java/src/jmri/jmrit/display/DisplayBundle_ja_JP.properties # java/src/jmri/jmrit/display/palette/FamilyItemPanel.java # java/src/jmri/jmrit/display/palette/PaletteBundle.properties
Call color names by Bundle
insert button name as {0} in property delete unused CPE keys in other languages
Clean up of label style in pop ups Some German props Props moved downstream to reuse
Preparing for more translations, rather clean up calls so properties can be reused multiple times from different packages than typing a translation for ‘Turnouts’ in 10 places (also: colors, buttons). Fixed a lot of misspelled property keys, which show up as (unused) stray translations. Hope I didn't erase existing stuff, tried to fix it or move it downstream. Will check when adding German. Still a bit of fine tuning to be done, so please label as WIP. |
The Bundle class in any package automatically inherits all keys available to the Bundle class that is extended. So for example: Since All Bundle classes ultimately extend |
@@ -3,7 +3,7 @@ | |||
# Default properties for the apps package of jmri. | |||
|
|||
# general menu items | |||
#MenuFile = File | |||
MenuFile = File |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overrides the MenuFile key in jmri/NamedBeanBundle.properties, and should be commented out or removed.
Color defaultLabelBackground = backgroundColorPanel.getBackground(); | ||
_backgroundcolors = new String[_fontcolors.length + 1]; | ||
for (int i = 0; i < _fontcolors.length; i++) { | ||
_backgroundcolors[i] = _fontcolors[i]; | ||
} | ||
_backgroundcolors[_backgroundcolors.length - 1] = "None"; | ||
_backgroundcolors[_backgroundcolors.length - 1] = Bundle.getMessage("ColorClear"); // I18N using Bundle.getMessage("ColorClear"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a literal that gets stored in a panel.xml file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's stores as hasBackground="yes" redBack="255" greenBack="255" blueBack="255"
so no problem.
However, in the present code when you choose Clear as the bg color in the popup menu of a Sensor Icon (i.e. to remove a background color), instead it saves as the color of the background (works as expected storing Clear/None with a "Sensor text icon").
@silverailscolo Despite all the comments, thanks for doing this. |
I used the key inheritance where I could. It's the older method of reading the whole resource at the start and then using |
Comment AppsBundle MenuFile/EditFile keys in all translations (checked they're in NBBundle) Tested workings of ColorClear in color popup (en & de)
Remove unused X/Y keys
move left/right keys from Palette to Bundle Clean up LogixTableBundle unused keys
Move FastClock key to NBB, point LogixBndl and LEBndl there Comment out unused keys in DisplayBndl (probably copied from LEBndl)
German translation of ControlPanelBundle keys (50%) Move Length key from several Operations Bundles to jmrit/Bundle Rename LE key from lower case length to Length and use Bundle.getMessage() method Add variable for button title to CPE DrawFrame instruction text
TitleScheduleEdit = \u4FE1\u53F7\u6A5F {0}\u306E\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u7DE8\u96C6 | ||
TitleScheduleAdd = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0 {0}\u306E\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u3092\u8FFD\u52A0 | ||
TitleSchedulesTable = \u30B9\u30B1\u30B8\u30E5\u30FC\u30EB | ||
TitleLocationsTable = \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was unaware all these translations were stored as upper case escapes. Following agreed styling, but this will hide the original edits. The real change to each is limited to commenting out the Length key (moved to jmrit.Bundle to be shared with Panels end Tables).
Use elipsis as variable in CPE menu & pane names Remove elipsis from menu item when there is a drop down choice Point Operations panes to Bundle for Length key
Remove empty keys created by IDE Replace german translation "belegt" by more common "besetzt" (not for Warrants) Move Cut/Copy/Paste menu item keys to NBBundle (to be accessible from /display) Put Detection Sensor (translation) as variable in instruction, move key to DisplayBundle Fix Warrant help urls
using Bundle.getMessage
# Conflicts: # java/src/jmri/jmrit/Bundle.properties
Insert button/field names as variables in translations Fix missing/unwanted elipsis Fix Bundle call of length>Length in Track Circuit pane
Is this still,work-in-progress (around Bundle use and encoding) or is it ready to merge? |
Fix Bundle call of color popup in LE Edit Track Correct label for detection sensor in Palette Some German translations
I hope to complete the translation and conversion of the Control Panel Bundle this weekend, after which this may be merged. Prefer to do some more manual testing because of the interdependencies with the other Display interfaces. |
Comment out unused Signal keys Fix LE spelling
Fix Circuit Path length unit switch tooltip
May be merged, WIP removed. |
Quite substantial reworking of the 3 Panel interface code
To prevent breaking access to resources, checked all usage in IDE and changed the most obvious ones to point to our basic set in NamedBeanBundle/Bundle/DisplayBundle
Clean up label style in pop ups/panes, respecting intentions of authors
Some German props, more to follow.