-
Notifications
You must be signed in to change notification settings - Fork 452
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
Remove country from language selection in the UI #7871
Comments
This commit removes the country name from locale names whenever they are displayed to an end user. The exception is when locales are listed in language installation forms, where site admins or journal managers need to be able to enable/disable different variants of the same language.
@jonasraoni can you take a look at this and let me know if this seems like an ok approach? PR: |
@jonasraoni or @asmecher do I need to do something special to support https://app.travis-ci.com/github/pkp/ojs/jobs/570021215#L4954-L4968 From this code: But I can see that locale key exists in the pkp-lib committed to that repo: 4466bf1...9f2be9e#diff-2b17bf8f47344c18449a502cf760b03c71d8188477a98b225fcef6b3eb43a3a9 |
@NateWr I had a similar issue at the unit tests, here's the culprit: https://github.com/pkp/pkp-lib/blob/main/tests/mock/env1/MockLocale.inc.php#L35-L41 I just can't remember if I spent time analyzing the idea/objective (if the idea is just to overwrite translations, then it's not needed anymore, the Laravel's |
Thanks @jonasraoni. What would be the appropriate fix for the tests in my case? It doesn't look like |
Given that facades have mock capabilities out of the box, I think this class can be wiped out. As a fast fix, I believe that removing the |
I'm sorry I don't know what to do with this. @asmecher can you pick this up and get it merged? I'm not sure what needs to happen with the tests. |
This commit removes the country name from locale names whenever they are displayed to an end user. The exception is when locales are listed in language installation forms, where site admins or journal managers need to be able to enable/disable different variants of the same language.
Just while I have a moment, testing to see whether removing edit: nope |
In the interests of moving this along, can I remove the following lines from the unit test and file a separate issue about the locale problems in unit tests? |
@NateWr I've replaced the old Mocks locally and did other cosmetic updates to the tests, I'll create a PR later to see if it passes through Travis 😂 |
As we've discussed, I'll handle the failing test in another issue, so you can skip the test by adding this to the beginning of the function: $this->markTestSkipped('TODO: Will be fixed by the issue #8040'); |
This commit removes the country name from locale names whenever they are displayed to an end user. The exception is when locales are listed in language installation forms, where site admins or journal managers need to be able to enable/disable different variants of the same language.
#7871 Remove country from locale names
pkp/pkp-lib#7871 Update test data after removing country from locale …
pkp/pkp-lib#7871 Remove country from locale names
pkp/pkp-lib#7871 Update tests after removing country from locale names
pkp/pkp-lib#7871 Update tests after removing country from locale names
At long last! I have journeyed to the top of Mount Testing and I have planted my ✔️ flag at its summit. (Merged to |
The design choices made here are being revised again over here: #7352 |
Describe the problem you would like to solve
There are a few places in the UI where the user can select to switch languages. These often show the full language designation, such as "French (Canadian)". However, it's very uncommon for two variants of the same language with the same script to be enabled at once, such as "French (Francais), French (Canadian)".
As a result, the country text is usually unnecessary, sometimes inappropriate, and can lead to a cluttered UI in some cases.
Describe the solution you'd like
Remove the country designation from some places where it isn't needed, such as:
The country should remain in the language description where locale settings are managed (Settings > Website > Setup > Languages).
Who is asking for this feature?
This will make the UI a little bit cleaner, especially with forms. An informal survey was done in our general slack channel and there were no known cases of journals that needed two variants of the same language in the same script.
The only known cases were where journals included both to be more inclusive, because it looked odd or inappropriate to say "Portugese (Brazil)" when it also accepted contributions from Portugal (or any variant of the language).
Additional information
Here is an example of where the country information is inappropriate, since no other English variant is available in OJS but many journals don't want to use "American" english.
The text was updated successfully, but these errors were encountered: