-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add Portuguese-PT locale/translations support #6836
base: main
Are you sure you want to change the base?
Conversation
Just a personal suggestion here (I’m not a native Portuguese speaker), for compatibility reasons, I think using There’s also a practical reason: as part of the localization, we’d need to modify |
Totally. The date formatting also addresses my question above, thank you. |
@auroursa there's a lot of people involved in this translation, if I edit the top of |
f476d61
to
5fff8e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the remaining pt-PT
(but you can still keep "Português (PT)" in the language list).
Yes, it won’t be overwritten by the lingui cli. It looks like you’ve updated all the language files. Please specify the language explicitly when running |
Apologies, I forgot this step. You’ll also need to rename the |
I actually think it would be better to mostly specify I read this somewhere else (can't remember where unfortunately) but one place that definitely says it is the Unicode CLDR Likely Subtags list. edit: It's stated more explicitly here:
|
I am concerned about compatibility with some browsers and older devices. Their language list only includes Portuguese, so it will output I noticed that the Portuguese government website uses both |
No, I think in web development, we should use |
I'm not sure that should be a particular issue, for |
Please give me some time to test it. I want to compile it on different platforms and check the results. |
@joaomendoncaa May I ask about your browser language list and mobile language list settings? I want to make sure my settings are correct. |
Of course, there's no rush :) I may well be wrong and |
This whole process might deserve an update to
Now that I think of it, we might be better off expanding them to
I don't know how to view the underlying codes used by my language preferences. I'm seeing different languages on different browsers. Re: Appreciate all the help. |
Currently need some additional information. could you open your browser developer tools (F12) > Console > and then enter this command: |
@surfdude29 might be right, |
If I’m mistaken, please forgive me, but I assume you have a local build environment. If you’re willing, could you test both It seems to work both on my end, but I’m not sure how it behaves in other browsers (I’m using Firefox). |
I tested test.mp4If it also works correctly in your browser tests, I think this comes down to a matter of personal preference. Either |
I don't know why, but I'm not being able to see any language changes in any browser, nor in mobile automatically (when changing the preferred language in settings). I have to manually switch it everytime regardless of what I do. When I do change it manually, it's changing correctly to the desired language. I think the best option here might just be explicitness (adding the 3 cases, and pointing them explicitly toward one case):
Keeping the cohesion with I promise the people actually doing the translations know more about my own language than I apparently do... |
Okay let’s reset to bf430e9 because the current code is a bit messy… As you mentioned, we should add a case for dates.fs: import {
…
pt,
ptBR,
…
} from 'date-fns/locale'
const locales: Record<AppLanguage, Locale | undefined> = {
…
['pt-PT']: pt,
['pt-BR']: ptBR,
…
} |
bf430e9
to
60ed53f
Compare
fix: post language doesn't sup regional distinctions fix: pt case fix: pt-PT .po header info
60ed53f
to
bebd875
Compare
Alright, everything looks good to me. Now the hard part. |
Would it be possible to add one more change to this PR? If you could add a Lines 115 to 116 in 770eeb5
Portuguese is already displayed as a supported language in the App Store listing so it won't make any changes there. However, because both Portuguese (Brazil) and Portuguese (Portugal) are listed as iPhone Languages: I feel like it's probably best to have specific, separate entries for them both in the |
Added all three keys in line with our reasoning above — thank you for the heads up! |
Co-authored-by: surfdude29 <[email protected]>
wip 🫡