-
Notifications
You must be signed in to change notification settings - Fork 67
jpass- Adds user-selected language feature #32
base: master
Are you sure you want to change the base?
Conversation
src/main/resources/resources/languages/languages_hu_HU.properties
Outdated
Show resolved
Hide resolved
src/main/resources/resources/languages/languages_it_IT.properties
Outdated
Show resolved
Hide resolved
Thanks for your changes, I'll review them in the following weeks (depending on job activities). |
src/main/resources/resources/languages/languages_it_IT.properties
Outdated
Show resolved
Hide resolved
src/main/resources/resources/languages/languages_it_IT.properties
Outdated
Show resolved
Hide resolved
@@ -232,8 +275,13 @@ public static JPassFrame getInstance() { | |||
|
|||
public static synchronized JPassFrame getInstance(String fileName) { | |||
if (instance == null) { | |||
String languageTag = Configuration.getInstance().get("language.languageSetting", "en-US"); | |||
instance = new JPassFrame(fileName, Locale.forLanguageTag(languageTag)); | |||
String languageTag = Configuration.getInstance().get(LANGUAGE_LANGUAGE_SETTING, null); |
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.
Why don't you simply use Configuration.getInstance().get(LANGUAGE_LANGUAGE_SETTING, "en-US")
here?
@@ -87,3 +90,9 @@ panel.save=Save | |||
panel.open=Open | |||
panel.saveModifiedQuestionMessage=The current file has been modified.\nDo you want to save the changes before closing? | |||
panel.unencryptedDataWarningMessage=Please note that all data will be stored unencrypted.\nMake sure you keep the exported file in a secure location. | |||
|
|||
language.languageChanged=Language has changed successfully. | |||
language.en.us=English |
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 don't think it is a good idea to store language names in language resources. Every time a new translation in introduced, then all the resources need to be updated. Maybe it would be better to hard-code them in the supported languages map.
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 added them on the language resource because language names change on each language so they have to be actually translated. It's true that with every new language all the current languages resources needs to add this new language name but I believe it's expected.
Let me know if you want it to change it anyway.
…o user_selected
This PR introduces: