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

226: support locale variants #747

Merged
merged 17 commits into from Jan 3, 2019
Merged

226: support locale variants #747

merged 17 commits into from Jan 3, 2019

Conversation

toolstack
Copy link
Contributor

@toolstack toolstack commented Jun 27, 2017

Resolves #226 .

@toolstack toolstack force-pushed the 226-support-locale-variants branch from 6575e41 to a5d3de8 Compare Jun 27, 2017
@toolstack toolstack requested a review from ocean90 Jun 27, 2017
@toolstack toolstack added this to the 3.0 milestone Jun 30, 2017
@@ -972,6 +1010,8 @@ public function __construct() {
$gsw->country_code = 'ch';
$gsw->wp_locale = 'gsw';
$gsw->slug = 'gsw';
$gsw->variant_root = $de->slug;
Copy link
Member

@swissspidy swissspidy Jul 12, 2017

Choose a reason for hiding this comment

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

Please note that while German (Switzerland) as a variant of standard German makes sense, Swiss German (gsw) is something completely different. It's a dialect (well, more than 26 different dialects to be precise) that has nothing in common with regular German. As such, $gsw shouldn't be a variant of $de.

Copy link

@pixelverbieger pixelverbieger Jul 12, 2017

Choose a reason for hiding this comment

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

… while de_DE_formal is missing and should be added to the list of variants for German

Copy link
Member

@swissspidy swissspidy Jul 12, 2017

Choose a reason for hiding this comment

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

That would be handled somewhere else though 🙂 de_DE_formal is not listed in locales.php after all, it's probably just a WordPress.org thing.

Copy link
Contributor Author

@toolstack toolstack Jul 12, 2017

Choose a reason for hiding this comment

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

Thanks @swissspidy, I'll remove the relationship.

@pixelverbieger I'm sure there will be many new variants added, like de_DE_formal once the the PR is merged, currently swsisspidy is correct that the formal variants are handled by translate.w.org separately.

toolstack added a commit that referenced this issue Jul 12, 2017
@toolstack toolstack force-pushed the 226-support-locale-variants branch from fdaafa1 to 5ea50d0 Compare Jul 12, 2017
toolstack added a commit that referenced this issue Jul 12, 2017
@GlotPress GlotPress deleted a comment from fiona0407 Aug 3, 2017
@toolstack toolstack force-pushed the 226-support-locale-variants branch from 83da488 to 2e25365 Compare Oct 8, 2017
toolstack added a commit that referenced this issue Oct 8, 2017
@toolstack toolstack force-pushed the 226-support-locale-variants branch from 8d79097 to c400170 Compare Oct 8, 2017
@toolstack toolstack force-pushed the 226-support-locale-variants branch from 21f5d61 to feeb2ae Compare Oct 17, 2017
toolstack added a commit that referenced this issue Oct 17, 2017
@toolstack toolstack force-pushed the 226-support-locale-variants branch from 0b9c55d to 53836f0 Compare Oct 17, 2017
gp-templates/translation-row.php Outdated Show resolved Hide resolved
@ocean90 ocean90 removed this from the 3.0 milestone Apr 8, 2018
@ocean90 ocean90 added this to the Future milestone Apr 8, 2018
@HughP
Copy link

@HughP HughP commented Apr 21, 2018

I’m not sure why the code invokes iso 629-2 codes. BCP 47 Tags should be used.

I don’t have a problem with the fallbacks chosen. They make sense. But it seems that the coding seems more complex than needed. ISO 639-2 and 639-3 are alligned for the purposes of locale codes CLDR or Iana should have the already Approved codes.

@toolstack toolstack removed this from the Future milestone Oct 12, 2018
@toolstack toolstack added this to the 3.0 milestone Oct 12, 2018
@toolstack toolstack force-pushed the 226-support-locale-variants branch from 1824c06 to c0d9348 Compare Oct 25, 2018
toolstack added a commit that referenced this issue Oct 25, 2018
@toolstack toolstack force-pushed the 226-support-locale-variants branch from dbedf1b to 6eb21fb Compare Oct 25, 2018
@xavivars
Copy link
Contributor

@xavivars xavivars commented Oct 26, 2018

Any idea of progress on this PR?

While discussing about the details could take forever (this language is/is-not a variant of another language), the functionality itself it's extremely useful for cases that are clear. For example, we now have *Valencian (ca-valencia, Catalan as spoken in Valencia), and falling back to English is simply not an option: there aren't enough translators to keep all themes/plugins up to date in both variants.

@toolstack
Copy link
Contributor Author

@toolstack toolstack commented Oct 26, 2018

It will be merged as part of 3.0, which is scheduled for a Dec 20th release.

@toolstack toolstack force-pushed the 226-support-locale-variants branch 2 times, most recently from c728f45 to 304745d Compare Oct 30, 2018
@toolstack toolstack force-pushed the 226-support-locale-variants branch from 77f9188 to 9446ca5 Compare Nov 8, 2018
@xavivars
Copy link
Contributor

@xavivars xavivars commented Nov 28, 2018

I guess ca-valencia will need to be added as a variant of ca in locales.php for this case to work, right?

@toolstack
Copy link
Contributor Author

@toolstack toolstack commented Nov 28, 2018

@xavivars Correct, it can be done for a site by either hooking in to the gp_locale_definitions_arrary filter or creating a custom locales file.

@toolstack toolstack force-pushed the 226-support-locale-variants branch from 9446ca5 to 2c28a33 Compare Jan 2, 2019
@toolstack toolstack merged commit ccdebb9 into develop Jan 3, 2019
2 checks passed
@toolstack toolstack deleted the 226-support-locale-variants branch Jan 3, 2019
@xavivars xavivars mentioned this pull request Mar 28, 2019
3 tasks
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.

None yet

6 participants