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 Remove redundant cs_CZ.js language file #1511

Conversation

sabina-talipova
Copy link
Contributor

Description

Probably, redundant cs_CZ.js lang file was created and added as part of this PR. cs_CZ.js file was removed.

Parent issue

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

This file should NOT be removed - it's not redundant, it's a valid set of translations. Instead, the unit test should be updated.

@sabina-talipova
Copy link
Contributor Author

sabina-talipova commented May 15, 2023

Instead, the unit test should be updated.

I don't think so. Test looks like work fine for all other cases.

Now we have two files for the Czech language cs_CZ.js and cs.js. According to the logic of the test, we should use only one translation and have only one file for each dialect that we support. For languages in which there are other dialects, for example for Austrian German (de_AT) we use a special file with translation de_AT.js, for all other German dialects we use a common file with translation de.js.
According to this logic, I can delete the cs.js file and replace 'cs_CZ' => 'cs' with 'cs_CZ' => 'cs_CZ' in the $tinymce_lang TinyMCEConfig config if you think it would be more correct.

I don't know if other varieties of Czech exist, but I don't think we support them anyway.

@sabina-talipova sabina-talipova changed the title FIX Remove redundant cs-CZ language file FIX Remove redundant cs_CZ.js language file May 15, 2023
@GuySartorelli
Copy link
Member

GuySartorelli commented May 15, 2023

According to the logic of the test, we should use only one translation and have only one file for each dialect that we support.

I think the test was written so that if you try to get a specific translation, and it's not available, the more generic translation is used.

For example if I am from Brazil and I want pt_BR but that's not available, it should fall back to pt if that's available. So I won't get Brazillian Portuguese, but I will get Portuguese.

have only one file for each dialect that we support.
I don't know if other varieties of Czech exist, but I don't think we support them anyway.

It's not us supporting the translations. These are provided by TinyMCE. It's not on us to decide what's valid or what isn't. If TinyMCE have provided a translation, we should allow it to be used. The test is just validating that if a specific translation isn't provided by TInyMCE, a more generic one is used if available.

That said - if the files for cs and cs_CZ have identical translations, then it's a moot point. If you confirm they're identical then I'll merge this as is.

@sabina-talipova
Copy link
Contributor Author

I have downloaded all available versions of TinyMCE Language Packs. cs.js and cs_CZ.js files exist for versions 4 and 5, but not for 6. It is possible that language files were selectively added in CMS in the past.

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.

2 participants