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

Fix test for quoted lang messages #3424

Merged
merged 2 commits into from
Nov 10, 2017
Merged

Conversation

halirutan
Copy link
Collaborator

Fix for #3397

(I made some newlines in the findMissingLocalizationKeys so that they can be better seen in the console)

  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)
  • If you changed the localization: Did you run gradle localizationUpdate?

Copy link
Member

@LinusDietz LinusDietz left a comment

Choose a reason for hiding this comment

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

Good Job!

final List<LocalizationEntry> quotedEntries = LocalizationParser
.findLocalizationParametersStringsInJavaFiles(LocalizationBundleForTest.LANG)
.stream()
.filter(key -> key.getKey().contains("_") && key.getKey().equals(new LocalizationKey(key.getKey()).getPropertiesKey()))
Copy link
Member

@LinusDietz LinusDietz Nov 10, 2017

Choose a reason for hiding this comment

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

I wonder if .contains('_') will produce false positives one day. Probably not very likely, as there are no problems so far.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@LinusDietz We need some test or we will get a lot of false positives for messages that consist only of a single word like "Cancel". I didn't put too much thought into this. It was the first that came to mind.

Copy link
Member

@LinusDietz LinusDietz Nov 10, 2017

Choose a reason for hiding this comment

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

@halirutan I agree with the approach and don't have any other reasonable idea to solve this. My remark serves karma purposes only, to have a 'told you so moment' if somebody actually needs to put an underscore into a localized String (;

@LinusDietz LinusDietz merged commit dba8db5 into master Nov 10, 2017
@LinusDietz LinusDietz deleted the fix-TestForQuotedLangMessages branch November 10, 2017 09:24
Siedlerchr added a commit that referenced this pull request Nov 10, 2017
* upstream/master: (26 commits)
  Fix test for quoted lang messages (#3424)
  Update gradle from 4.3 to 4.3.1
  Fix #3411: ordering of fields in customized entry types works again (#3422)
  Backport of syncLang to python2 (#3420)
  Remove Versioneye badge
  Fix some error prone warnings
  Fix for issue #2721 append to a field (#3395)
  Fix travis - hopefully
  Remove 3.x changelog (#3250)
  Try to use hint of https://github.com/TheBoegl/shadow-log4j-transformer#usage-as-library
  Try to enable LGTM
  Update guava from 23.2 -> 23.3 (#3409)
  Update wiremock from 2.8.0 -> 2.10.1
  Move groups field from others to general (#3407)
  Fix checkstyle issues to repair build
  Fix #3046: No longer allow duplicate fields in customized entry types (#3405)
  Strip invalid prolog when loading CitationStyles (#3404)
  Integrity check "Abbreviation Detection" detects abbreviated names for journals and booktitles based on the internal list instead of only looking for "." signs. (#3362)
  Update gradle from 4.2.1 to 4.3
  Update gradle from 4.2.1 to 4.3
  ...
Siedlerchr added a commit that referenced this pull request Nov 18, 2017
* upstream/master: (23 commits)
  Feature java version check again (#3428)
  Fix test for quoted lang messages (#3424)
  Update gradle from 4.3 to 4.3.1
  Fix #3411: ordering of fields in customized entry types works again (#3422)
  Backport of syncLang to python2 (#3420)
  Remove Versioneye badge
  Fix some error prone warnings
  Fix for issue #2721 append to a field (#3395)
  Fix travis - hopefully
  Remove 3.x changelog (#3250)
  Try to use hint of https://github.com/TheBoegl/shadow-log4j-transformer#usage-as-library
  Try to enable LGTM
  Update guava from 23.2 -> 23.3 (#3409)
  Update wiremock from 2.8.0 -> 2.10.1
  Move groups field from others to general (#3407)
  Fix checkstyle issues to repair build
  Fix #3046: No longer allow duplicate fields in customized entry types (#3405)
  Strip invalid prolog when loading CitationStyles (#3404)
  Integrity check "Abbreviation Detection" detects abbreviated names for journals and booktitles based on the internal list instead of only looking for "." signs. (#3362)
  Update gradle from 4.2.1 to 4.3
  ...
Siedlerchr added a commit that referenced this pull request Nov 19, 2017
* upstream/master: (30 commits)
  Add Hint for checking master version (#3439)
  Replace LinkedFiles backslashes with forward slashes (#3403)
  fix isbn result from chimbori (#3442)
  Feature java version check again (#3428)
  Fix test for quoted lang messages (#3424)
  Update gradle from 4.3 to 4.3.1
  Fix #3411: ordering of fields in customized entry types works again (#3422)
  Backport of syncLang to python2 (#3420)
  Remove Versioneye badge
  Fix some error prone warnings
  Fix for issue #2721 append to a field (#3395)
  Fix travis - hopefully
  Remove 3.x changelog (#3250)
  Try to use hint of https://github.com/TheBoegl/shadow-log4j-transformer#usage-as-library
  Try to enable LGTM
  Update guava from 23.2 -> 23.3 (#3409)
  Update wiremock from 2.8.0 -> 2.10.1
  Move groups field from others to general (#3407)
  Fix checkstyle issues to repair build
  Fix #3046: No longer allow duplicate fields in customized entry types (#3405)
  ...
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.

3 participants