-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 split multiline localization #9814
Conversation
Test case would be fine
Oliver Kopp ***@***.***> schrieb am Sa., 29. Apr. 2023, 01:14:
… While checking #9811 <#9811>, I
found a very strange translation key. I fixed that (using our \n
possibility) and made the string consistent to an existing one.
Also removed a space at the end of a localization key. Not sure whether I
should create a test case for that?
I also ignored a file created by the tool https://structure101.com/.
The content you are editing has changed. Please copy your edits and
refresh the page.
Title of tasklist
Cancel Save
Compulsory checks
Edit tasklist title
Beta Give feedback
<community/community#39106>
Rename Copy markdown Delete tasklist
Delete tasklist Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
Cancel Delete
1.
Change in `CHANGELOG.md` described in a way that is understandable for
the average user (if applicable)
Change in `CHANGELOG.md` described in a way that is understandable for
the average user (if applicable)
Change in CHANGELOG.md described in a way that is understandable for
the average user (if applicable)
Remove
Successfully updated the issue's project
There was an error updating the issue's project
2.
Tests created for changes (if applicable)
Tests created for changes (if applicable)
Tests created for changes (if applicable)
Remove
Successfully updated the issue's project
There was an error updating the issue's project
3.
Manually tested changed features in running JabRef (always required)
Manually tested changed features in running JabRef (always required)
Manually tested changed features in running JabRef (always required)
Remove
Successfully updated the issue's project
There was an error updating the issue's project
4.
Screenshots added in PR description (for UI changes)
Screenshots added in PR description (for UI changes)
Screenshots added in PR description (for UI changes)
Remove
Successfully updated the issue's project
There was an error updating the issue's project
5.
[Checked developer's documentation](https://devdocs.jabref.org/): Is
the information available and up to date? If not, I outlined it in this
pull request.
[Checked developer's documentation](https://devdocs.jabref.org/): Is
the information available and up to date? If not, I outlined it in this
pull request.
Checked developer's documentation <https://devdocs.jabref.org/>: Is
the information available and up to date? If not, I outlined it in this
pull request.
Remove
Successfully updated the issue's project
There was an error updating the issue's project
6.
[Checked documentation](https://docs.jabref.org/): Is the information
available and up to date? If not, I created an issue at <
https://github.com/JabRef/user-documentation/issues> or, even better,
I submitted a pull request to the documentation repository.
[Checked documentation](https://docs.jabref.org/): Is the information
available and up to date? If not, I created an issue at
<https://github.com/JabRef/user-documentation/issues> or, even better, I
submitted a pull request to the documentation repository.
Checked documentation <https://docs.jabref.org/>: Is the information
available and up to date? If not, I created an issue at
https://github.com/JabRef/user-documentation/issues or, even better, I
submitted a pull request to the documentation repository.
Remove
Successfully updated the issue's project
There was an error updating the issue's project
7.
Remove
8.
Add item to Compulsory checks
Type to add an item or paste in an issue URL
------------------------------
You can view, comment on, or merge this pull request online at:
#9814
Commit Summary
- 3009e81
<3009e81>
Fix split multiline localization.
File Changes
(3 files <https://github.com/JabRef/jabref/pull/9814/files>)
- *M* .gitignore
<https://github.com/JabRef/jabref/pull/9814/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947>
(2)
- *M*
src/main/java/org/jabref/gui/preferences/linkedfiles/LinkedFilesTabViewModel.java
<https://github.com/JabRef/jabref/pull/9814/files#diff-d588ea655e68232c70a22385b4575c34717dcd25d9663935a455ac329aeec7b6>
(13)
- *M* src/main/resources/l10n/JabRef_en.properties
<https://github.com/JabRef/jabref/pull/9814/files#diff-9a980680b11e1907a43ef94d2002c2a9eba0b469fe4208f6aa9b09fe3e0e40f7>
(10)
Patch Links:
- https://github.com/JabRef/jabref/pull/9814.patch
- https://github.com/JabRef/jabref/pull/9814.diff
—
Reply to this email directly, view it on GitHub
<#9814>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACOFZHNXW3H77RLALQVTW3XDRFMFANCNFSM6AAAAAAXPZQT5U>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I only changed the localization. Maybe @HoussemNasri - do you have an idea how to trigger that? The string was introduced at #9625 (where @Siedlerchr was more relaxed regarding text cases ^^). |
Create a new folder, put that in main file directory and delete the folder again? then go to prefs again? |
Or you could change the main file directory to a folder that doesn't exist |
ValidationMessage error = ValidationMessage.error(String.format( | ||
"%s%n%s%n%n%s%n%n%s > %s > %s", | ||
Localization.lang("Main directory not found"), | ||
mainDirectoryPath, | ||
Localization.lang("Please select a valid main directory under"), | ||
Localization.lang("Linked files"), | ||
Localization.lang("File directory"), | ||
Localization.lang("Main file directory") | ||
)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the hell did I do this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-use of existing translations I guess.
Good idea though. I try to re-use translations by grouping similar translations next to each other. Then, at the review on GitHub (by @calixtus e.g.), it can come up. Other than that, I hope that Crowdin also uses sub strings for its "brain" suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea was to have just one common warning message and the already existing translations of the titles of the tabs and sections as breadcrumbs to find the preference setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise you will have to create new translations for every validation message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea was to have just one common warning message
I think, the old message was misleading, because one cannot touch the library preferences.
and the already existing translations of the titles of the tabs and sections as breadcrumbs to find the preference setting.
There (IMHO) already was another message with "Linked files". I adapted that to be consistent.
Finally, I think, the preference is easy to find (we also have the search functionality). Thus, I like the short pointer to the preference.
@HoussemNasri No, actually this is correct. The main file dir is across all libraries (global), the other ones are per bib file |
I see, then the error message needs to be changed because configuring file directories in Library properties won't prevent the error |
Side note: We try to explain the different directories at https://docs.jabref.org/setup/databaseproperties#override-default-file-directories. |
I don't get that part. The validation message points to the global preferences and not to the settings in the library. Then, changing the global preferences should fix the error? |
Yes, only changing the global preference will fix the error. I just checked, I set a valid path in Library properties and an invalid main file directory in preferences, but I still couldn't save the preferences and got an error dialog. I don't know much about the directory override mechanism, but it isn't triggered when saving preferences. |
Usage example:
And it cannot be triggered there, because the global preferences should be independent of the current library.
I fixed the string (and adapted the others) - Localization.lang("Main file directory %0 not found.\nCheck the preferences (linked files) or the library properties.", mainDirectoryPath)
+ Localization.lang("Main file directory '%0' not found.\nCheck the tab \"Linked files\".", mainDirectoryPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my point of view, it's now clearer
* upstream/main: (72 commits) Fix split multiline localization (#9814) New Crowdin updates (#9834) change versin to 0.8.10 remove jacoco version config Bump org.junit.platform:junit-platform-launcher from 1.9.2 to 1.9.3 Bump org.jsoup:jsoup from 1.15.4 to 1.16.1 Bump org.junit.jupiter:junit-jupiter from 5.9.2 to 5.9.3 Bump com.puppycrawl.tools:checkstyle from 10.9.3 to 10.10.0 Bump com.vladsch.flexmark:flexmark from 0.64.0 to 0.64.2 Refresh example styles Squashed 'buildres/csl/csl-styles/' changes from 4728902faa..a985762505 New translations JabRef_en.properties (Tagalog) New translations JabRef_en.properties (Persian) New translations JabRef_en.properties (Indonesian) New translations JabRef_en.properties (Portuguese, Brazilian) New translations JabRef_en.properties (Vietnamese) New translations JabRef_en.properties (Chinese Traditional) New translations JabRef_en.properties (Chinese Simplified) New translations JabRef_en.properties (Ukrainian) New translations JabRef_en.properties (Turkish) ...
* upstream/main: (88 commits) Minimal config for openRewrite Fix missing # Fix modernizer (JabRef#9824) CHANGELOG.md Removed unused code Refined ui Dissolved FileTab and moved contents to EntryTab Renamed CustomEditorFieldsTab to EntryEditorTabsTab Fixed antipattern, fixed radiobutton with checkbox Renamed ImportExportPreferences to ExportPreferences Improve search history by attaching change listener (JabRef#9794) Separated WebSearchPrefs and ExportPrefs Separated WebSearchTab and ExportTab Renamed ImportExportTab to WebSearchTab Fix split multiline localization (JabRef#9814) New Crowdin updates (JabRef#9834) change versin to 0.8.10 remove jacoco version config Bump org.junit.platform:junit-platform-launcher from 1.9.2 to 1.9.3 Bump org.jsoup:jsoup from 1.15.4 to 1.16.1 ...
…biblatex-date-formats * upstream/main: (132 commits) Add four rules not having any effect Apply BooleanChecksNotInverted Remove unused RadioButtonCell Minimal config for openRewrite Fix missing # Fix modernizer (JabRef#9824) CHANGELOG.md Removed unused code Refined ui Dissolved FileTab and moved contents to EntryTab Renamed CustomEditorFieldsTab to EntryEditorTabsTab Fixed antipattern, fixed radiobutton with checkbox Renamed ImportExportPreferences to ExportPreferences Improve search history by attaching change listener (JabRef#9794) Separated WebSearchPrefs and ExportPrefs Separated WebSearchTab and ExportTab Renamed ImportExportTab to WebSearchTab Fix split multiline localization (JabRef#9814) New Crowdin updates (JabRef#9834) change versin to 0.8.10 ...
While checking #9811, I found a very strange translation key. I fixed that (using our
\n
possibility) and made the string consistent to an existing one.Also removed a space at the end of a localization key. Not sure whether I should create a test case for that?
I also ignored a file created by the tool https://structure101.com/.
Compulsory checks