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

use gettext to handle translations #79

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jibec
Copy link

@Jibec Jibec commented Aug 15, 2021

as Fedora community member, I'll be pleased to host you on our translation platform
it would make it faster for translators to contribute your project, and reduce the follow-up cost (people who want it will be notified when you update your pot file).
You don't have to do anything else than:

  • update the pot file when you do changes in your code
  • add po files in your project before release

have a nice day, thank you for the fun :)

as Fedora community member, I'll be pleased to host you on our translation platform
it would make it faster for translators to contribute your project, and reduce the follow-up cost (people who want it will be notified when you update your pot file).
You don't have to do anything else than:
* update the pot file when you do changes in your code
* add po files in your project before release

have a nice day, thank you for the fun :)
@rluders
Copy link
Contributor

rluders commented Aug 17, 2021

Hey @Jibec

Thanks for your contribution.
It will be a nice improvement to bring us more translations, and we do really appreciate it.

However, I'm struggling to run it:

image

Maybe @ernesgonzalez33 could give it a try as well? I'm wondering if I'm not doing something wrong.

Also, I do have one small observation, that since we are using the "locale" files to generate the dropdown menu that allows the user to select language since we don't have the en_US, right now, we don't have it as an option in our dropdown.

BTW, I think that it would be better to use the TRANSLATION_KEYS instead of normal texts for the translation keys. So, it can solve the en_US issue as well, since we gonna need to have an en_US.po file.

@ernesgonzalez33
Copy link
Contributor

Hi! @Jibec

I have the same problem as @rluders. How do we see the translations? It seems that the drop-down menu doesn't work

@Jibec
Copy link
Author

Jibec commented Aug 18, 2021 via email

Copy link
Contributor

@rluders rluders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that those project changes should be part of the PR as well... Right?
So, IMHO to accept this PR it is necessary first to:

  • Revert back the translation keys
  • Include the 'en_US.po' file (so the language dropbox will work again)
  • Fix the translation imports

@ernesgonzalez33 ernesgonzalez33 deleted the branch CodeCafeOpenShiftGame:main August 19, 2021 13:03
@Jibec
Copy link
Author

Jibec commented Aug 21, 2021 via email

@Jibec
Copy link
Author

Jibec commented Aug 22, 2021

If I revert translation keys:

  • it makes translator work more complex (no translation memory help from translations platform, require to check how it is translated in english)
  • it makes dev work more complex (require to make sure there is no missing keys, and there is already)

Are you sure you want this?

I did fix the translation import using Godot Engine 3.3 stable from Flathub, but I have an import error preventing me to make sure english language is correctly displayed in the language button.

Here is the error:
image

The tool to fix broken dependencies don't show any error, and the button to fix broken dependencies is greyed out.

What is weird is that I see the files when using the GNOME file browser, and access rights looks normal.
But when in Godot, I can't see the file:
image

I assume there is something obvious I'm missing. Any idea?

@rluders
Copy link
Contributor

rluders commented Aug 22, 2021

@Jibec I'm pretty sure that you are not using the Godot version that supports Mono, and that is why you are getting that missing messages.

If I revert translation keys:

it makes translator work more complex (no translation memory help from translations platform, require to check how it is translated in english)
it makes dev work more complex (require to make sure there is no missing keys, and there is already)
Are you sure you want this?

I'm not sure if there is another option. I mean, you could include the option to "en_US" directly to the dropbox by code, but... I'm not sure how it will work. It needs to be tested.

@rluders rluders self-requested a review August 22, 2021 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants