expressjs.com icon indicating copy to clipboard operation
expressjs.com copied to clipboard

correct lang code for es and zh-cn

Open ShubhamOulkar opened this issue 6 months ago • 10 comments

Introduced in https://github.com/expressjs/expressjs.com/pull/1874

ShubhamOulkar avatar May 30 '25 15:05 ShubhamOulkar

Deploy Preview for expressjscom-preview ready!

Name Link
Latest commit cfb92c2a95b2014f21f380d7355b4dbe1a4167e5
Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6839ccb8f478b200088e0c27
Deploy Preview https://deploy-preview-1934--expressjscom-preview.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar May 30 '25 15:05 netlify[bot]

The problem is that Crowdin would overwrite this; I’m going to look for a way to do it from Crowdin.

bjohansebas avatar May 31 '25 18:05 bjohansebas

I looked into Crowdin and I don’t see a way to do it automatically. Doing this every time Crowdin opens a PR is quite a manual task, and I don’t think it’s something we should have to deal with. Maybe the best option would be to create a script that, after the translations are downloaded, adjusts the language depending on the file, as a temporary solution. @ShubhamOulkar do you want to do that?

bjohansebas avatar Jun 01 '25 01:06 bjohansebas

@bjohansebas, I am confused 😕. How all other languages got correct lang code? Did you edited manually all lang code?

ShubhamOulkar avatar Jun 01 '25 03:06 ShubhamOulkar

problem is that Crowdin would overwrite

crowdin can pull changes from repo

do you want to do that?

I will look into it. Once I understand crowdin github workflow.

ShubhamOulkar avatar Jun 01 '25 04:06 ShubhamOulkar

@bjohansebas, I am confused 😕. How all other languages got correct lang code? Did you edited manually all lang code?

Because Crowdin doesn’t manage to translate everything. For some reason, it did transform the codes for the other languages, but for these languages it didn’t understand that it needed to transform them.

Although I could probably make the changes manually from Crowdin and accept this PR, we really need a solution to prevent this from happening

crowdin can pull changes from repo

Yes, but we only upload the English folder to Crowdin, so any changes made to the files in i18n won't be reflected there.

bjohansebas avatar Jun 01 '25 17:06 bjohansebas

only upload the English folder

Understood

ShubhamOulkar avatar Jun 01 '25 18:06 ShubhamOulkar

Hi @bjohansebas, have you had a chance to try this File Pre-Export Processing Module for Crowdin? It lets you modify strings before files are exported from Crowdin. Also, Crowdin recommends using language codes like es-ES and zh-CN instead of es and zh-cn.

ShubhamOulkar avatar Jun 03 '25 13:06 ShubhamOulkar

have you had a chance to try this File Pre-Export Processing Module for Crowdin? It lets you modify strings before files are exported from Crowdin.

Hi, I hadn’t seen it. I’ll take a look as soon as I can. Thanks for the resource!

Crowdin recommends using language codes like es-ES and zh-CN instead of es and zh-cn.

We can’t, we would break quite a few links that exist, and really es is fine since it covers the entire Spanish language. In contrast, es-ES refers only to the Spanish from Spain

bjohansebas avatar Jun 03 '25 18:06 bjohansebas

I'll keep PR open until the language code issue is resolved in Crowdin.

ShubhamOulkar avatar Jun 12 '25 13:06 ShubhamOulkar

https://github.com/expressjs/expressjs.com/pull/1971#issuecomment-3064214758

bjohansebas avatar Jul 11 '25 23:07 bjohansebas

https://github.com/expressjs/expressjs.com/pull/1975

bjohansebas avatar Jul 16 '25 18:07 bjohansebas