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

Missing translations in in launcher popupmenus #511

Closed
micheleg opened this issue May 29, 2017 · 21 comments
Closed

Missing translations in in launcher popupmenus #511

micheleg opened this issue May 29, 2017 · 21 comments
Labels

Comments

@micheleg
Copy link
Owner

The few custom strings in the launcher popupmenus (e.g. "All windows") are not currently getting translated. We need to find a way to use both the extensions gettext domain and the shell one to reuse the strings.

@micheleg micheleg added the bug label May 29, 2017
@franglais125
Copy link
Contributor

franglais125 commented May 29, 2017

Huh, I never realized this.

Anyway, I fixed it here: https://github.com/franglais125/dash-to-dock/tree/translations

All translation files need to be updated though. So checking out that branch is not enough.

These are the steps to update the po files, right?

make potfile
make mergepo

Edit: so far, this commit franglais125@c429130

@micheleg
Copy link
Owner Author

micheleg commented May 30, 2017

Is it working for you? I did try a similar thing (https://github.com/micheleg/dash-to-dock/tree/fix_translations) but it seems I cannot access the extension gettext domain. It still only traslate strings which are present in the shell too.

We actually even loose some of the upstream translated strings (e.g. "Remove from Fovorites").

make mergepo should suffice to updates the transations.

@franglais125
Copy link
Contributor

It is working for me.

I just uploaded some further modifications I had done, we ended up doing similar things actually.

@micheleg
Copy link
Owner Author

Strange, It doesn't seem to work in Debian/3.22. Are you on 3.24?

@franglais125
Copy link
Contributor

No, on Debian Stretch (3.22).

I have to manually delete po/dashtodock.pot before running make mergepo.

Here is a screenshot:
captura de pantalla de 2017-05-30 16-14-36

@franglais125
Copy link
Contributor

I'll test your branch and see what happens.

@franglais125
Copy link
Contributor

I think you are missing the init part of it. I modified extension.js in my branch. Look here franglais125@c429130 again, at the very bottom.

@micheleg
Copy link
Owner Author

Yes, I think I did try that as well, I don;t remember. In any case, I tested your branch and it doesn't work on my system. However, I normally don't use a localized language, therefore maybe something is wrong on my setup.

@franglais125
Copy link
Contributor

I don't use localization either, plain English. I just have a separate user with a different language for testing this sort of thing. Perhaps it would be nice to have confirmation from someone else that is works, or not.

I'll include updated po* files, so it's easier to test.

@franglais125
Copy link
Contributor

@zapashcanon Sorry to bother, do you think you can test this branch? https://github.com/franglais125/dash-to-dock/tree/translations

We are trying to see if the string "All Windows" gets translated. It comes with the option "Show open windows previews", when using the right click menu.

Merci!

@micheleg
Copy link
Owner Author

Ok, I found out the issue was with the Italian translation file. I never realized entries marked as #, fuzzy are not actually used.

@franglais125
Copy link
Contributor

Ah! Yes, those lines are usually automatically included by the internationalization tool as a "guess" of how to translate the strings, but with that tag to be safe.

@micheleg
Copy link
Owner Author

Good to know... Now, beside the missing initialization in my branch, the only difference is that I was excluding the generation of strings from (_), converting all files to use a different function (__), reserving the original for those strings already translated upstream (i.e. when reusing someof the upstream code). In this way we avoid to "ask" for translation of those strings in the pot file. In my system, _ turns out to be always defined, and it works. What do you think about this?

@franglais125
Copy link
Contributor

I noticed the exact same thing. However, when I use your branch, it keeps adding the regular single _ strings (e.g. "New Window"), and not just the ones with __.

I had done something similar: I modified the prefix _ for _dtd wherever we wanted specific translations, and left the original _ ones where we don't need them, so that the extension gets the translations from upstream. However, I like your notation better (__ instead of _dtd).

@micheleg
Copy link
Owner Author

I forgot to upload the latest changes, now it should not add those strings.

Not sure about __ vs _dtd. It's mainly a matter of clarity, but I wouldn't be bothered too much about the choice.

@franglais125
Copy link
Contributor

Ah, perfect! Now I'm ok with it :).

@micheleg
Copy link
Owner Author

I've merged my branch into master [51db80a].

@franglais125
Copy link
Contributor

Perfect, thanks. Do you mind picking up [a4d30e3] ? It's in my master branch.

@micheleg
Copy link
Owner Author

Done [e11ba1f]. Thanks for the help. I think I'll prepare the release now.

@zapashcanon
Copy link
Contributor

@franglais125 sorry for the late answer, do you still need me to test this ?

For another gnome-shell extensions, I removed the .pot file and all the .mo files, in order to clean the repository, then I added rules to the makefile to update the .po files automatically when needed, maybe it could help here too to avoid having outdated translation file or related stuff. See the repo and the Makefile I'm talking about: if you change something to one of the file which need to be translated and then run make build, you'll see the .po files updated if needed.

@franglais125
Copy link
Contributor

@zapashcanon Sorry I didn't mention it again, I think we are ok with this issue now, and the fix was included in master as well. So don't worry about it, and thanks!

As for the translations workflow, there is a similar functionality already in the Makefile. Running make mergepo will look for translatable strings in the source code and add them to the .po files if necessary.

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

No branches or pull requests

3 participants