cgeo / WhereYouGo

Clone of the unmaintained repository (biylda/WhereYouGo) to continue app development
GNU General Public License v3.0
97 stars 40 forks source link

Rename language pt_PT to pt #342

Open bekuno opened 2 years ago

bekuno commented 2 years ago

Tell us your idea!

The language resolution strategy of android is described in https://developer.android.com/guide/topics/resources/multilingual-support#preN . If we rename pt_PT to pt, then a system language configuration of pt_PT is mapped to pt, and a system language of pt is resolved directly.

@Lineflyer We have a simular solution for zh_CN in c:geo.

What solution would you suggest?

No response

Is there an alternative?

No response

Additional Information

No response

Lineflyer commented 2 years ago

Its a language code mapping on Crowdin. I could set this up easily, but what to do with brazilian then?

image

Lineflyer commented 2 years ago

For comparison, that is what we use for c:geo: image

bekuno commented 2 years ago

Please look at Chinese Simplified (zh_CN). How is Portuguese defined for c:geo?

Btw., I can´t found/see this mapping. Is it here on the Github integrations page? (https://crowdin.com/project/whereyougo/apps/system/github) grafik

The pt_BR should stay unchanged, like zh_TW for c:geo. See also https://github.com/cgeo/cgeo/blob/master/main/build.gradle#L54

Lineflyer commented 2 years ago

Its not bound to Github integration but a generic setting for the Crowdin project, you can find it in the settings in the section "export" behind "language mapping": image

Lineflyer commented 2 years ago

The pt_BR should stay unchanged, like zh_TW for c:geo.

That would mean I simply remove the pt to pr_rPT mapping then. However there was a reason I did that...need to look through old issues first...I wouldn't have done it without need.

Lineflyer commented 2 years ago

In https://github.com/cgeo/WhereYouGo/issues/23#issuecomment-610352494 I noted down, that without this rPT theere is something missing from Crowdin....but we can try what happens.

Not sure if it will work as I also mention in that thread, that the change needs to be done before creating the integration to Github.

I will try that out as time permits, but can we stay with the hotfix provided until then or is it mandatory to change this before we can merge that PR?

bekuno commented 2 years ago

Ok, found it. The Chinese Simplified is mapping to the default 2-letter code.

I will try that out as time permits, but can we stay with the hotfix provided until then or is it mandatory to change this before we can merge that PR?

The PR is fine in the current implementation with a workaround for Portuguese pt. After the change at crowdin this workaround should be removed.

bekuno commented 2 years ago

In #23 (comment) I noted down, that without this rPT theere is something missing from Crowdin....but we can try what happens.

After reading the comment, I think we first need to rename the folder values-pt-rPT to values-pt . Then remove the special mapping at crowdin.