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

Improve SyncLang.py #3184

Merged
merged 6 commits into from
Nov 3, 2017
Merged

Improve SyncLang.py #3184

merged 6 commits into from
Nov 3, 2017

Conversation

LinusDietz
Copy link
Member

@LinusDietz LinusDietz commented Sep 1, 2017

See Issue #3181.

  • Update to Python 3
  • automatically generate the translation status with each push to master and publish a html version on jabref.org
  • keep a constant order for the table of languages: English first, then alphabetical
  • put the table of menus first (so that is it not discouraging newcomers with a huge number of strings waiting for translation).
  • align to the right the columns with numbers (easier to read, but just a tiny detail).
  • Apply object-oriented design principles

@mlep
Copy link
Contributor

mlep commented Sep 1, 2017

Additional task: in a new column of the tables, flag files with anomalies (such as space characters found in localized strings).

Is there any other special characters for localized strings?

@LinusDietz
Copy link
Member Author

@mlep, I think we should rather write a test case for that in Java, so that it is not possible to commit such malformed strings

@mlep
Copy link
Contributor

mlep commented Sep 1, 2017

Fine. Great!

@LinusDietz LinusDietz changed the title [WIP] Improve SyncLang.py Improve SyncLang.py Oct 9, 2017
@LinusDietz LinusDietz added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Oct 9, 2017
@LinusDietz
Copy link
Member Author

I have refactored that script, however I have not yet tried to incorporate it in the build pipeline. I would merge this for now and think about the build automation in another PR.

@Siedlerchr
Copy link
Member

Can you check the case if the syncing does correctly add/remove keys when I do a rename of a key?
I recently had the problem with the old version of the script in a branch.
E..g. I previously created a new key e.g. Exporting_file_X_of_Bibtex_Entry
Synced that to all lang files
Afterwards I just renamed the BIbEntry to "entry", ran it again and the script did not replace the changes in the other files. I guess it was because it was at the same line. After I moved the renamed key to another position, it worked

"""
if line.find("#") != 0 or line.find("!") != 0:
index_key_end = line.find("=")
while (index_key_end > 0) and (line[index_key_end - 1] == "\\"):
Copy link
Member

Choose a reason for hiding this comment

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

Just curious: Is this platform independent line endings?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, I have enforced the line ending handling.

@lenhard
Copy link
Member

lenhard commented Oct 27, 2017

Bump.

Can we get this PR ready to merge?

@Siedlerchr Siedlerchr mentioned this pull request Nov 3, 2017
@LinusDietz
Copy link
Member Author

@Siedlerchr Yep, updating and deleting entries works for me.

@lenhard I think we can merge.

@lenhard
Copy link
Member

lenhard commented Nov 3, 2017

Ok, perfect! Then I'll do this right away.

@lynyus I am not 100% sure if #3181 is ready to be closed based on this PR or what it means for #3397. Could you please have a look at these issues and close or comment?

@lenhard lenhard merged commit f5842ef into master Nov 3, 2017
@lenhard lenhard deleted the synclang-python3 branch November 3, 2017 15:31
Siedlerchr added a commit that referenced this pull request Nov 3, 2017
* upstream/master: (22 commits)
  Improve SyncLang.py (#3184)
  Config intellj code style to adhere to empty lines checkstyle rule (#3365)
  Don't list same look and feels more than once (#3393)
  progessdialog and result table are now shown correclty on copy files
  Export pdf/linked files  (#3147)
  Added checking integrity dialog (#3388)
  Update richtext and flowless (#3386)
  Source tab: hide notification pane when code is correct again (#3387)
  Titles are optional at crossref (#3378)
  Update entry for every change in the source panel (#3366)
  Rework AutoSetFileLinks (#3368)
  revert wrongly commited changes
  Refactorings (#3370)
  Fix freezing when running cleanup file operations like rename (#3315)
  This additional style setting for IDEA (#3355)
  Fix checkstyle
  Add proper equals to content selector
  Delete unused code
  Extract difference finder from gui to logic
  Remove unnecessary EntrySorter
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/entryeditor/SourceTab.java
Siedlerchr added a commit that referenced this pull request Nov 4, 2017
* upstream/master: (26 commits)
  Fix static localized text (#3400)
  Fix problems in source editor (#3398)
  Fix MathSciNet fetcher (#3402)
  Fix NPE when saving new file
  Improve SyncLang.py (#3184)
  Config intellj code style to adhere to empty lines checkstyle rule (#3365)
  Don't list same look and feels more than once (#3393)
  progessdialog and result table are now shown correclty on copy files
  Export pdf/linked files  (#3147)
  Added checking integrity dialog (#3388)
  Update richtext and flowless (#3386)
  Source tab: hide notification pane when code is correct again (#3387)
  Titles are optional at crossref (#3378)
  Update entry for every change in the source panel (#3366)
  Rework AutoSetFileLinks (#3368)
  revert wrongly commited changes
  Refactorings (#3370)
  Fix freezing when running cleanup file operations like rename (#3315)
  This additional style setting for IDEA (#3355)
  Fix checkstyle
  ...

# Conflicts:
#	CHANGELOG.md
Siedlerchr added a commit that referenced this pull request Nov 19, 2017
* upstream/master:
  Improve SyncLang.py (#3184)
  Config intellj code style to adhere to empty lines checkstyle rule (#3365)
  Don't list same look and feels more than once (#3393)
  progessdialog and result table are now shown correclty on copy files
  Export pdf/linked files  (#3147)
  Added checking integrity dialog (#3388)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants