Page MenuHomePhabricator

Adding Latin American Spanish as language code
Closed, ResolvedPublic

Description

I checked this with Amir over email, moving the conversation here.

We will be running a fundraising campaign in Latin America sometime next calendar year, for now the campaign is planned for April but we are working on a big tech integration for this, so plans might change.

Is there a way we can create a new language code on Meta for Latin American Spanish? The same way we have pt-br as a language code, that we use for Brazil campaigns, it would be great if we can have a language code for 'standard Latin American Spanish'. While LATAM Spanish varies between different countries, there is a 'standard version' that is accepted across countries, often used in advertising, subtitles etc.

Thanks for your feedback.

Event Timeline

jrobell created this task.Sep 17 2015, 2:54 PM
jrobell assigned this task to Amire80.
jrobell raised the priority of this task from to Needs Triage.
jrobell updated the task description. (Show Details)
jrobell added subscribers: jrobell, Pcoombe, Nikerabbit.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 17 2015, 2:54 PM
Nemo_bis renamed this task from Adding LATAM Spanish as language code to Adding Latin American Spanish as language code.Sep 17 2015, 7:51 PM
Nemo_bis set Security to None.

Hi @Amire80

I am checking back in on this again to see if adding Latin American Spanish as a language code would be possible? Could you please advice.

Thank you!

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptFeb 18 2016, 12:37 PM

@jrobell Just to clarify, even if this is added we would still need separate banners because the default people see will still be es (just like we need separate banners for Brazilian Portuguese, despite the fact it has its own language code).

This could still be helpful for payments forms, donatewiki and pages like Ways to Give.

Thank you for chiming in @Pcoombe. Yeah, that sounds right to me. The additional language code would be super helpful also for the thank you email that donors receive. With the current flow and only one language code for es we cannot send a separate thank you email to Latin American donors vs Spanish donors in Spain, even though they saw two separate banners with localized appeals in their language variations.

Pginer-WMF triaged this task as High priority.May 29 2018, 7:48 AM
Pginer-WMF moved this task from Backlog to Maintenance backlog on the Language-2018-Apr-June board.

Change 440278 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Enable more languages in Special:Translate and Special:SearchTranslations

https://gerrit.wikimedia.org/r/440278

Change 440280 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/core@master] Add es-419

https://gerrit.wikimedia.org/r/440280

Change 440282 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[translatewiki@master] Disable es-419 for translations by default

https://gerrit.wikimedia.org/r/440282

Change 440282 merged by jenkins-bot:
[translatewiki@master] Disable es-419 for translations by default

https://gerrit.wikimedia.org/r/440282

After all my patches are merged, the following is expected:

  • MediaWiki knows about code es-419, i.e. it has a name and it is included in Language::fetchLanguageNames( null, 'mw' )
  • It is not selectable as interface language directly, but uselang=es-419 can be used, but there is no automatic fallback to es
  • Translatable wiki pages can be translated to es-419
  • MediaWiki and extensions cannot be localised to es-419 unless specifically enabled.

@jrobell @Pcoombe Do you think this will be sufficient?

@Nikerabbit That sounds good to me! So we could then manually enable es-419 localisation for DonationInterface extension?

How difficult would it be to add fallback to es? Not a big deal if it's hard, but it would be helpful.

That sounds good to me! So we could then manually enable es-419 localisation for DonationInterface extension?

Yes, I will submit a patch for that in translatewiki.net configuration.

How difficult would it be to add fallback to es? Not a big deal if it's hard, but it would be helpful.

Technically easy, except adding a fallback makes es-419 available as in interface language, which I was trying to avoid. To add a fallback without making it available will require some more coding. I am mainly thinking that it would be easy to do after T190129 (but that won't be ready in near future).

Change 440280 merged by jenkins-bot:
[mediawiki/core@master] Add the es-419 language code to support South American Spanish

https://gerrit.wikimedia.org/r/440280

Change 440278 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Enable more languages in Special:Translate and Special:SearchTranslations

https://gerrit.wikimedia.org/r/440278

Change 442033 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Make more consistent the behavior of MessageGroupBase::getTranslatableLanguages

https://gerrit.wikimedia.org/r/442033

Change 442034 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] PremadeMediawikiExtensionGroups: Add support for language white/blacklists

https://gerrit.wikimedia.org/r/442034

Change 442035 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[translatewiki@master] Enable es-419 for DonationInterface

https://gerrit.wikimedia.org/r/442035

Change 442033 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Make more consistent the behavior of MessageGroupBase::getTranslatableLanguages

https://gerrit.wikimedia.org/r/442033

Change 442034 merged by Nikerabbit:
[mediawiki/extensions/Translate@master] PremadeMediawikiExtensionGroups: Add support for language white/blacklists

https://gerrit.wikimedia.org/r/442034

Any reason why the language code for this isn't 'es-x-Q653884' or something similar, in the same way language codes are being devised for lexemes at present?

I have no idea how language codes are being devised for lexemes, can you tell more?

Regardless, the answer is: Published standard language codes are always preferred over opaque private use extensions.

Change 442035 merged by jenkins-bot:
[translatewiki@master] Enable es-419 for DonationInterface

https://gerrit.wikimedia.org/r/442035

Arrbee closed this task as Resolved.Jul 16 2018, 7:11 AM

@Nikerabbit Thanks for the help! I confirmed that DonationInterface on translatewiki, and wiki pages, can both be translated into es-419, español de América Latina.

In the absence of a fallback, would it be possible to bulk copy over the existing es translations for DonationInterface to es-419 to get us started?

Ejegg added a subscriber: Ejegg.Jul 16 2018, 3:19 PM

@Pcoombe I think we should be able to do that just by copying the es.json file in the extension to es-419.json.

We'll also have to backport @Nikerabbit's patch to the payments-wiki branch, since that wiki runs on the LTS version of mediawiki and not the latest master.

Oof, I forgot payments runs on a different version. Thanks @Ejegg for the reminder, and for looking at copying the messages over!

Change 468067 had a related patch set uploaded (by Ejegg; owner: Nikerabbit):
[mediawiki/core@fundraising/REL1_27] Add the es-419 language code to support South American Spanish

https://gerrit.wikimedia.org/r/468067

Change 468067 merged by jenkins-bot:
[mediawiki/core@fundraising/REL1_27] Add the es-419 language code to support South American Spanish

https://gerrit.wikimedia.org/r/468067