Skip to content
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

Untranslated text #3397

Closed
tobiasdiez opened this issue Nov 3, 2017 · 4 comments
Closed

Untranslated text #3397

tobiasdiez opened this issue Nov 3, 2017 · 4 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs internationalization i18n ui
Milestone

Comments

@tobiasdiez
Copy link
Member

In todays master, for example:

Warning: could not get message translation for "Create_blank_entry_linking_the_PDF" for locale en
Warning: could not get message translation for "Create_entry_based_on_XMP-metadata" for locale en
Warning: could not get message translation for "Create_entry_based_on_content" for locale en
Warning: could not get message translation for "Only_attach_PDF" for locale en

The problem is the old format using the underscore. I think the were missed, when @halirutan improved the language handling. Our tests should be adapted to report warnings in this cases (just report them as not found).

@tobiasdiez tobiasdiez added bug Confirmed bugs or reports that are very likely to be bugs ui labels Nov 3, 2017
@tobiasdiez tobiasdiez added this to the v4.1 milestone Nov 3, 2017
@Siedlerchr
Copy link
Member

Refs #3184

@lenhard lenhard mentioned this issue Nov 3, 2017
6 tasks
@halirutan
Copy link
Collaborator

@tobiasdiez I was aware of that and carefully checked that all usages did not use underscores. There was at this time only one instance that needed to be replaced. I'm sorry, I should have pointed this out more clearly back then: To make a fast cache, the un-quoting and translating of the messages is done on the first instantiation. Messages in code lang(..) must not contain the underscored variant but need to be the real message (which is more natural anyway).

@tobiasdiez
Copy link
Member Author

@halirutan Its perfectly fine! I actually like that the underscore version does no longer work (it was a relic of old times).

@halirutan
Copy link
Collaborator

I added a test that will take care of this.

java.lang.AssertionError: Language keys must not be used quoted in code! Use "This is a message" instead of "This_is_a_message".
Please correct the following entries:
[
"Create_entry_based_on_content" (src/main/java/org/jabref/gui/preftabs/ImportSettingsTab.java)
, 
"ID-based_entry_generator" (src/main/java/org/jabref/gui/EntryTypeDialog.java)
, 
"Only_attach_PDF" (src/main/java/org/jabref/gui/preftabs/ImportSettingsTab.java)
, 
"Create_entry_based_on_XMP-metadata" (src/main/java/org/jabref/gui/preftabs/ImportSettingsTab.java)
, 
"Create_blank_entry_linking_the_PDF" (src/main/java/org/jabref/gui/preftabs/ImportSettingsTab.java)
] 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs internationalization i18n ui
Projects
None yet
Development

No branches or pull requests

5 participants