Skip to content

New Gradle Task: sort Localization Keys#1933

Merged
koppor merged 3 commits into
JabRef:masterfrom
chriba:sortLocalizationKeys
Sep 12, 2016
Merged

New Gradle Task: sort Localization Keys#1933
koppor merged 3 commits into
JabRef:masterfrom
chriba:sortLocalizationKeys

Conversation

@chriba

@chriba chriba commented Sep 7, 2016

Copy link
Copy Markdown
Contributor

As soon as you have a PR which adds new localization propertires and another PR with new localization gets merged you have to solve these conflicts which is just annoying.

With this gradle task the keys in the Localization files get rearranged according to the English file.
The top 3 comment lines of each file stay the same (some files have different encoding) but everything else (comments, blank lines) are getting synced with the English file.

The localization file are only sorted if they have no missing, obsolete, or duplicate keys.
A colored output is printed to inform the developer.

When this PR has passed I plan to refactor syncLang.py, code and output wise.

@mlep

mlep commented Sep 7, 2016

Copy link
Copy Markdown
Contributor

Just to make sure: Will this PR keep empty entries at the bottom of the file? (that makes localization much easier)

@chriba

chriba commented Sep 7, 2016

Copy link
Copy Markdown
Contributor Author

NoYes, it will set each entry to the exact same line as it is in the English file, where new keys are added at the end.

@mlep

mlep commented Sep 7, 2016

Copy link
Copy Markdown
Contributor

Thanks for your quick reply.

@Siedlerchr

Copy link
Copy Markdown
Member

@mlep I think for new entries (not yet present in English), they will be still stay and added at the bottom.

@chriba chriba mentioned this pull request Sep 8, 2016
Nothing_to_undo=Ingenting_\u00e5_angre

# The next is used like in "References found\: 1 Number of references to fetch?"
#Thenextisusedlikein"Referencesfound\:1Numberofreferencestofetch?"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the spaces removed?

@chriba chriba Sep 9, 2016

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spaces are already missing in the current English localization.
Comments in languages other than English overridden by the English one.

https://github.com/JabRef/jabref/blob/master/src/main/resources/l10n/JabRef_en.properties#L520

I'll fix them.
Edit: do we even need those comments? They are both the same and doesn't seem to address the line below.

@koppor koppor changed the title [WIP] New Gradle Task: sort Localization Keys New Gradle Task: sort Localization Keys Sep 12, 2016
@koppor koppor merged commit b8ea1c6 into JabRef:master Sep 12, 2016
@chriba chriba deleted the sortLocalizationKeys branch September 12, 2016 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants