Skip to content

Rewrite localization script#2010

Merged
koppor merged 4 commits into
JabRef:masterfrom
chriba:rewriteLocalizationScript
Sep 22, 2016
Merged

Rewrite localization script#2010
koppor merged 4 commits into
JabRef:masterfrom
chriba:rewriteLocalizationScript

Conversation

@chriba

@chriba chriba commented Sep 19, 2016

Copy link
Copy Markdown
Contributor

Relevant Issues: #1939

I rewrote the the localization script:

The Script has following commands available

  • $ python scripts/syncLang.py status [--extended]
    • prints the current status to the terminal
    • [--extended] if the translations keys which create problems should be printed
    • usable with Gradle tasks
      • $ gradle status
      • $ gradle statusExtended
  • $ python scripts/syncLang.py markdown
    • Creates a markdown file of the current status and opens it
    • usable with Gradle tasks
      • $ gradle statusWithMarkdown
  • $ python scripts/syncLang.py update [--extended]
    • compares all the localization files against the English one and fixes unambiguous duplicates, removes obsolete keys, adds missing keys, and sorts them
    • [--extended] if the translations keys which create problems should be printed
    • usable with Gradle tasks
      • $ gradle update
      • $ gradle updateExtended

Localization files status (2016-09-19 20:12 - Branch rewriteLocalizationScript eef4325)

Property file Keys Keys translated Keys not translated % translated
JabRef_en.properties 1572 1572 0 100
JabRef_da.properties 1572 970 602 61
JabRef_de.properties 1572 1568 4 99
JabRef_es.properties 1572 1391 181 88
JabRef_fa.properties 1572 1 1571 0
JabRef_fr.properties 1572 1570 2 99
JabRef_in.properties 1572 1232 340 78
JabRef_it.properties 1572 1162 410 73
JabRef_ja.properties 1573 1571 2 99
JabRef_nl.properties 1572 646 926 41
JabRef_no.properties 1572 967 605 61
JabRef_pt_BR.properties 1572 1208 364 76
JabRef_ru.properties 1572 1161 411 73
JabRef_sv.properties 1572 1413 159 89
JabRef_tr.properties 1572 1572 0 100
JabRef_vi.properties 1572 837 735 53
JabRef_zh.properties 1572 1225 347 77
Property file Keys Keys translated Keys not translated % translated
Menu_en.properties 106 106 0 100
Menu_da.properties 106 95 11 89
Menu_de.properties 106 106 0 100
Menu_es.properties 106 95 11 89
Menu_fa.properties 106 95 11 89
Menu_fr.properties 106 106 0 100
Menu_in.properties 106 95 11 89
Menu_it.properties 106 100 6 94
Menu_ja.properties 106 106 0 100
Menu_nl.properties 106 95 11 89
Menu_no.properties 106 104 2 98
Menu_pt_BR.properties 106 95 11 89
Menu_ru.properties 106 95 11 89
Menu_sv.properties 106 105 1 99
Menu_tr.properties 106 105 1 99
Menu_vi.properties 106 78 28 73
Menu_zh.properties 106 95 11 89

@koppor koppor added the stupro label Sep 19, 2016

Show_names_unchanged=Ordre_des_noms_inchangé

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.

Where does that come from?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like one of my changes. I noticed some spurious space characters in the French localization, and so removed them.
Now, looking at the English localization, these spaces are also present between the same keys:

Show_names_unchanged=Show_names_unchanged

Show_optional_fields=Show_optional_fields

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.

Good catch, I can strip (deleting spaces before and after) each line in the English file (thus in each file).

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.

But be careful, when you checkout the files on Windows it will become CRLF and converted to LF by check in. (Default setting for git)

@Siedlerchr

Copy link
Copy Markdown
Member

One additonal thing would be nice, I noticed by checking the failing tests in #2018 that it contained still the old legacy \uxxx encodings.
I manually replaced them with Search + Replace, but it would be nice to automatically convert them.

@koppor koppor merged commit e415435 into JabRef:master Sep 22, 2016
@chriba chriba deleted the rewriteLocalizationScript branch September 22, 2016 09:45
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.

4 participants