globalvoices / NewsFrames-Code

Code for the NewsFrames Platform available at newsframes.org
https://newsframes.globalvoices.org
Other
2 stars 1 forks source link

Update language codes #30

Closed scttnlsn closed 6 years ago

scttnlsn commented 6 years ago

This switches to using language codes with regional dialects (i.e. en_US, zh_TW, etc.)

scttnlsn commented 6 years ago

@connieimdialog I forgot that we have checklist translations that we'll need to migrate. Looks like there are existing translations for the following 3-letter language codes:

eng, spa, aar

I can migrate eng to en_US but what should the other 2 be?

connieimdialog commented 6 years ago

@scttnlsn spa should be: es (that one exists in the list, yes?) aar is a mistake. can you just set that to ... es as well?

scttnlsn commented 6 years ago

@connieimdialog Great, thanks. Yes es exists.

scttnlsn commented 6 years ago

@sapraaman Locales are using this new form since that's what Transifex outputs. The value stored in a user's language preference field are now the new form: i.e. en_US I removed all the 3-letter codes (which we were using previously) and we no longer need to map from 3-letter to 2-letter since the new form is used everywhere.

connieimdialog commented 6 years ago

hi! noticing that fr.yml comes up only when "French-France" is selected but not when "French" is. can i create a duplicate of these files, and can one be tied to French and one to French-France, @scttnlsn

scttnlsn commented 6 years ago

@connieimdialog Yes indeed! We could also change the language mapping file (https://github.com/globalvoices/NewsFrames-Code/blob/develop/config/languages.csv) so that both point to the same YAML file (i.e. change https://github.com/globalvoices/NewsFrames-Code/blob/develop/config/languages.csv#L165 to French, fr_FR)

connieimdialog commented 6 years ago

@scttnlsn i have created fr_FR.yml and devise.fr_FR.yml and tweaked the fr:/fr_FR: accordingly. if this works, then can close this and push everything to PROD

connieimdialog commented 6 years ago

yes! looks good