Skip to content
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

🚀 Feature: localization #84

Closed
stonith404 opened this issue Jan 22, 2023 · 65 comments
Closed

🚀 Feature: localization #84

stonith404 opened this issue Jan 22, 2023 · 65 comments
Assignees
Labels
feature New feature or request

Comments

@stonith404
Copy link
Owner

🔖 Feature description

We should implement localization for the Pingvin Share website. The functionality for localization isn't implemented yet and I've never done this before, but I try to implement this ASAP.

If someone wants to help to translate or help with the technical stuff for localization, feel free leave a comment :)

🎤 Pitch

By implementing localization on the website, we can enhance the user experience for non-English speakers and make it more accessible and understandable for them.

@stonith404 stonith404 added the feature New feature or request label Jan 22, 2023
@stautonico
Copy link
Contributor

I can work on this, implementing i18n localization shouldn't be too difficult. I can't translate everything obviously, but I can start getting the framework laid out so translations can be implemented

@stautonico
Copy link
Contributor

Just a little heads up, the way the localization is going to work is there will be json files for each language which includes the translated strings. Each page will reference the strings in the json file instead of typing the strings manually. The default locale can be specified manually in the config, through automatic browser detection, or maybe stored on a per-user basis (to remember their preferred locale, configured in settings?)

@stonith404
Copy link
Owner Author

@stautonico That would be awesome! It would really appreciate if you could implement the localization feature. Translating should be easy, because users could then contribute to translations without having coding knowledge.

I think it would be nice if it detects the browser locale but the user should then be able to manually change the language in the settings. Keep in mind that the error messages on the backend should be translated too, is this difficult to implement?

@stautonico
Copy link
Contributor

@stautonico That would be awesome! It would really appreciate if you could implement the localization feature. Translating should be easy, because users could then contribute to translations without having coding knowledge.

I think it would be nice if it detects the browser locale but the user should then be able to manually change the language in the settings. Keep in mind that the error messages on the backend should be translated too, is this difficult to implement?

Backend translation would have to be configured manually through an environment variable or config somewhere. It would also require separate work, but it shouldn't be that hard.

@lfac76
Copy link

lfac76 commented Jan 26, 2023

I'm not a programmer but I can help translate into Portuguese (Brazil).

The Pingvin Share is awsome!

@stonith404
Copy link
Owner Author

@lfac76 Thank you! We let you know when the implementation is ready :)

@stautonico
Copy link
Contributor

@stonith404 I hope this will be resolved soon, but apparently prisma (^4.9.0) no longer works on arch. The issue was opened on the prisma repo yesterday. This prevents me from working on the latest version of prisma. I'm going to downgrade prisma on my local build so I can work on it.I hope this won't cause any issues.

@victorpahuus
Copy link

I'm not a programmer, hopefully one day :-)
But I would love to help translate to Danish (Denmark)

@Hukuma1
Copy link

Hukuma1 commented Mar 1, 2023

@stautonico Not sure if it matters, but apparently the dev of prisma said it was a mere warning, not an actual error message. If prisma worked before on your platform (arch), it will continue to do so. They just added the warning message in 4.9.0. As per: prisma/prisma#17545 (comment)

And supposedly 4.10.0 won't have this warning show up anymore for certain distros, arch included.

@stonith404
Copy link
Owner Author

@stautonico are you still interested on working on this issue?

@stautonico
Copy link
Contributor

I would like to, but I've been very busy with school. If there's anyone who would want to take over, I'd be okay with that, otherwise, I would like to pick back up on it once school slows down.

@stonith404
Copy link
Owner Author

@stautonico Yeah sure, take your time :)

@iUnstable0
Copy link
Contributor

I can translate to Thai

@Rooyca
Copy link
Contributor

Rooyca commented Mar 31, 2023

Hey there!

I could help with Spanish translation.

@YunchaoZheng
Copy link
Contributor

I'd happy to help translating into Chinese Simplified

@Rooyca
Copy link
Contributor

Rooyca commented Apr 3, 2023

Hey!

Can I start working on this? I think I know how to do it 😸

@stonith404
Copy link
Owner Author

@Rooyca Thanks for your interest but @stautonico is almost finished with the implementation: https://github.com/stautonico/pingvin-share/tree/feat-84-localization

There are some minor issues that we have to solve but I think it will be ready in maximum 2 weeks, as I have holidays coming up soon

@Rooyca
Copy link
Contributor

Rooyca commented Apr 3, 2023

@Rooyca Thanks for your interest but @stautonico is almost finished with the implementation: https://github.com/stautonico/pingvin-share/tree/feat-84-localization

There are some minor issues that we have to solve but I think it will be ready in maximum 2 weeks, as I have holidays coming up soon

Awesome!

Are you guys using i18next? If that's the case, I could start translating into Spanish... I'd need the json to reference

@stonith404
Copy link
Owner Author

@Rooyca We use react-intl, but it's not really different in terms of translating. The files are stored inside /frontend/src/i18n/translations. While I really appreciate that you want start translating now, I would recommend you to wait until we are finished as we may change some things before we release it.

@Hoerch
Copy link

Hoerch commented May 9, 2023

After giving the start signal for the translation work, I could translate the texts to German.

@stautonico
Copy link
Contributor

Sure, it'll be ready for translations soon!

@Seb-a320
Copy link

Seb-a320 commented Jun 2, 2023

Hey ! Any news ?

I could help with French translation.

@stonith404
Copy link
Owner Author

@stautonico has worked on this feature and came really far.

Currently I'm studying for my final exams and I don't have the time to work on the project but as soon as I'm finished, I'll finish this feature if @stautonico doesn't want to :)

@stautonico
Copy link
Contributor

Yes, I'm almost done with my semester. I have one final left on Friday, and then I have the rest of the summer to work on it :)

@SimonPistache
Copy link

SimonPistache commented Jun 4, 2023

What could be nice is to use a platform such as Crowdin, Weblate, that could ease the work of translators (instead of editing json files)

Ready to help translating in French as well.

@stonith404
Copy link
Owner Author

@EttSimon Good idea, this would allow users who are not experienced in coding and Git to contribute to the translations.

@Rooyca
Copy link
Contributor

Rooyca commented Jul 18, 2023

Hey!

I just joined the Crowdin project 😸

@SimonPistache
Copy link

SimonPistache commented Jul 18, 2023

Come to think, if things don't work out with Crowdin, changing to another tool should not be so complicated as most of the work seems to be on the code itself. :)

Welcome @Rooyca

@Rooyca
Copy link
Contributor

Rooyca commented Jul 18, 2023

yes, it's just a file like this right? I could start translating today jajaj :)

@victorpahuus
Copy link

@stonith404 Can you add Danish, to Crowdin? Then i will translate it :-)

@SimonPistache
Copy link

Are we already starting translating? the linked PR is still draft 🧐

@victorpahuus
Copy link

Are we already starting translating? the linked PR is still draft 🧐

Idk, i just found https://crowdin.com/project/pingvin-share

@SimonPistache
Copy link

Are we already starting translating? the linked PR is still draft 🧐

Idk, i just found https://crowdin.com/project/pingvin-share

Let @stonith404 give us the start, I don't think he is ready yet. Plus if we translate too soon and he have to start the Crowdin over, we risk loosing our work. Let's wait for the official signal, shall we?

@victorpahuus
Copy link

Are we already starting translating? the linked PR is still draft 🧐

Idk, i just found https://crowdin.com/project/pingvin-share

Let @stonith404 give us the start, I don't think he is ready yet. Plus if we translate too soon and he have to start the Crowdin over, we risk loosing our work. Let's wait for the official signal, shall we?

Sounds like a great plan🚀

@stonith404
Copy link
Owner Author

Yeah I'm almost finished. Currently the admin configuration page and the input validations needs some work but then I'm done.

@stonith404
Copy link
Owner Author

Everything should be ready now. I only have to add a language picker.

I'm playing around with Crowdin but I'm a bit confused. Is there anyone that has some experience as an administrator with Crowdin?

@SimonPistache
Copy link

Not an admin but ask anyway maybe I could help ?

@stonith404
Copy link
Owner Author

@EttSimon Ah nice. It confuses me that everyone can just translate the strings without any verification or approval.

I've created a test account for translating on Crowdin and after I translated some strings crowdin automatically pushed these changes to the translation branch.

Trollers could translate some bad stuff and this would get pushed directly. Is there a way to prevent this?

@SimonPistache
Copy link

SimonPistache commented Jul 19, 2023

@EttSimon Ah nice. It confuses me that everyone can just translate the strings without any verification or approval.

Trollers could translate some bad stuff and this would get pushed directly. Is there a way to prevent this?

There is definitively a toggle or community management mode somewhere because at gitea, translators need to be granted approvers to approve (lol) translations (regardless of the best voted, if it come from a user or a bot) ; otherwise the translation is not included at release.

@stonith404
Copy link
Owner Author

@EttSimon Okay thanks, I'll look into it. I'll also take a look into the docs, I hope they're useful.

@stonith404
Copy link
Owner Author

The branch is merged 🎉

I'll wait for a few translations before I release it. I would love if you could help to translate Pingvin Share :)
Here is a list of potential contributors:

German : @Hoerch
French : @pierrbt @Seb-a320 @EttSimon
Portugueze : @lfac76
Danish : @victorpahuus
Thai : @iUnstable0
Spanish : @Rooyca
Chinese Simplified : @YunchaoZheng

How you can help with translating

  1. Get the Pingvin Share i18n preview by using the Docker Image stonith404/pingvin-share:i18n-preview
  2. Get started with translating on https://crowdin.com/project/pingvin-share

Feel free to participate in the localization discussion :)

@stonith404
Copy link
Owner Author

Btw a big thank you to @stautonico for developing the biggest part in this feature.

@victorpahuus
Copy link

Wow, there's a lot of translations going on already.
Thank you (@stautonico & @stonith404) for taking the time to integrate the translation feature. Can't wait to see when the first translations are launched.

@stonith404 stonith404 added the waiting-for-release Fixed or added and will be added to the next release label Jul 20, 2023
@stonith404
Copy link
Owner Author

Screenshot 2023-07-23 at 00 12 14@2x

Thanks everyone for helping to translate Pingvin Share! I'll release the new version tomorrow :)

@lfac76
Copy link

lfac76 commented Jul 22, 2023 via email

@stonith404 stonith404 removed the waiting-for-release Fixed or added and will be added to the next release label Jul 23, 2023
@stonith404
Copy link
Owner Author

Released :)

@SimonPistache
Copy link

thank you @stonith404 for allowing it :)

@lfac76
Copy link

lfac76 commented Jul 23, 2023 via email

@stonith404
Copy link
Owner Author

@lfac76 Oh sorry, yes sure I'll change that. How should I name Brazilian Portuguese in the language picker? Currently it is "Português".

@lfac76
Copy link

lfac76 commented Jul 24, 2023 via email

@stonith404
Copy link
Owner Author

@lfac76 Okay, so Português do Brasil would be correct?

@pierrbt
Copy link
Contributor

pierrbt commented Jul 24, 2023

@lfac76 are Portuguese and Brazilian Portuguese really diffent at the scale of the application ?

@lfac76
Copy link

lfac76 commented Jul 24, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests