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

pt-BR translation to the Quit Telegram option #25121

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

DanGLES3
Copy link

Having this option be in english only makes it conflict with the current set language on a user's computer, i'd suggest making translations for this option encouraged

If this isn't the correct place for this then feel free to close this pull request

Having this option be in english only makes it conflict with the current set language on a user's computer, i'd suggest making translations for this option encouraged 

If this isn't the correct place for this then feel free to close this pull request
@CLAassistant
Copy link

CLAassistant commented Sep 23, 2022

CLA assistant check
All committers have signed the CLA.

@fitojb
Copy link

fitojb commented Nov 1, 2022

Thank you for finding the root of the problem. I’ve noticed it too; after your patch is merged, I’ll send one to add Spanish, Catalan and Asturian.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 2, 2022

@fitojb there's no plan to merge this AFAIK. All the user-visible strings must come from the Telegram Translation Platform. To properly fix this, one has to write a generator that would get the strings from the translation platform and write them to the .desktop file as part of the build process.

@ilya-fedin
Copy link
Contributor

A way easier solution would be to use some runtime API, so the application itself has to send already localized string to the system. But unfortunately there's no such API AFAIK (only the deprecated Unity Launcher API, no one implements it now) :(. It's an idea for you guys to ask for that API at XDG, GNOME or somewhere else if you have interest in this to be solved. Otherwise it's likely to stay like this forever since it's non-trivial to write such a generator given that the translation is provided via the regular MTProto Telegram API, I don't imagine anyone who wants to work on that (currently that seem to be only you guys) would have the related experience as well as I don't imagine anyone who have the related experience would like to work on that.

@john-preston
Copy link
Member

@DanGLES3 @fitojb @EmeraldCity3

Anyone with a spare half day and knowledge of JS can contribute to upstream by implementing full translations of these keys, similar to how user-agent updates are carried out on GitHub.

Here's the repo: https://github.com/desktop-app/action_code_updater

In this repo, you can define actions that will modify the code of Telegram Desktop (tdesktop) via cron. If any changes are detected, automatic PRs can be created to merge these modifications. Currently, there are two actions in place: updating the current Chromium user-agent and updating the copyright year to the new year (a bit of humor here).

Here's the code: https://github.com/desktop-app/action_code_updater/blob/master/index.js

We need to add a new action that will update our .desktop file. For this you need to:

Download and parse this - https://translations.telegram.org/languages/list/tdesktop, to get a list of language identifiers included in tdesktop.

For each language, download and parse the full .strings file from a link like https://translations.telegram.org/en/tdesktop/export (replacing "en" with the corresponding language).

Extract necessary lines from there (ensuring correct escaping, unicode, etc., so as not to generate an invalid .desktop), for example lng_quit_from_tray (Quit Telegram). I can add a missing line for the description, but only when the script is functioning (meanwhile, any line from the file can be used, it's not critical).

Update the .desktop file in the repo by adding all these translations.

Allow it to create a PR if there are any changes (this should be implemented similarly to the existing two actions).

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.

None yet

6 participants