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

Dialog to approach translators #1473

Closed
buhtz opened this issue Jul 13, 2023 · 9 comments · Fixed by #1504
Closed

Dialog to approach translators #1473

buhtz opened this issue Jul 13, 2023 · 9 comments · Fixed by #1504
Assignees
Labels
Cosmetics appearance, icons, themes Discussion decision or consensus needed

Comments

@buhtz
Copy link
Member

buhtz commented Jul 13, 2023

This is a quick shot idea. 😄
I would like to present our users this dialog.
translate_dialog drawio (1)

  • This is a modal dialog.
  • The two buttons "German" and "English" are tab buttons. The current set language (e.g. "German") is presented by default. But the user is also able to view the "source language" English if needed.
  • The dialog do not appear on the first start of BIT but after some starts (e.g. 5 times or 10 or more). The reason is that a new user need to get comfortable with BIT and its GUI before doing anything else. Such a dialog on the first start will be experienced as an annoying disturbance. And the "bonding" between BIT and the user is not established on the first start.
  • I do have a solution to count the number of BIT starts and differentiate them from scheduled starts.
  • I do have a solution to calculate the completeness of the current used language on the local machine without asking the translation platform via a remote connect.
  • We could restrict this dialog to languages with a completeness threshold (less then 50%?).

Alternatives

There are also ideas about alternative ways to present such a message to the user. But I'm not convinced with them.

For example Thunderbird do use a non modal landing page integrated in its main window.
image
I do use Thunderbird for many years but never read that page. It is IMHO to "silent". And it appears on the first start where I don't want a user to be disturbed with something like this.

Another approach is to have this translation message hidden somewhere in the menus. I will implement a separate "Language selection" menu where this could be place somehow. But I would treat this alternative approach as an addition and not as an replacement to my initial approach. By the way: In such a language selection menu I would also present the completeness of each language in % and have an extra entry like "Help with translations".

Plain text in German and English (typos included)

Hallo.

Sie haben Back In Time nun schon einige Mal genutzt und die Sprache XYZ
eingestellt.

Die Übersetzung von Back In Time in diese Sprache ist nur zu N % vollständig.
Auch ohne besondere technische Kenntnisse, können Sie die Übersetzung
vervollständigen und somit dem Projekt helfen.

Wenn Sie helfen möchten, besuchen Sie bitte die Übersetzungsplattform.
Für weitere Hilfestellung und Fragen besuchen Sie bitte die Website von
Back In Time.

Bitte entschuldigen Sie die Störung. Sie werden diese Nachricht nicht noch
einmal sehen. Ihr Back In Time Team.

--------------------------------------------------------------------------------

Hello.

You have used Back In Time a few times now and set the language to XYZ.

The translation of Back In Time into this language is only N% complete. Even
without special technical knowledge, you can complete the translation and
thus help the project.

If you want to help, please visit the translation platform.
For further assistance and questions, please visit the Back In Time website.

Please accept our apologies for the disruption. You will not see this message
again. Your Back In Time Team.

The following terms would appear as hyperlinks

@buhtz buhtz self-assigned this Jul 13, 2023
@buhtz buhtz added Discussion decision or consensus needed Cosmetics appearance, icons, themes labels Jul 13, 2023
@buhtz buhtz added this to the upcoming release (1.3.4) milestone Jul 13, 2023
@aryoda
Copy link
Contributor

aryoda commented Jul 16, 2023

Very good idea to ask our users :-)

A new menu entry in the help menu would also be good to see the dialog again whenever the user want this
(+ mentioning this in the dialog: "You can open this dialog at any time via the "help" menu.").

Does this feature access the internet to get the translation completeness? I think as user I would not want my apps to "go wild" in the internet without my permission.

@buhtz
Copy link
Member Author

buhtz commented Jul 17, 2023

Thanks for your feedback.

Does this feature access the internet to get the translation completeness? I think as user I would not want my apps to "go wild" in the internet without my permission.

I feel the same. There is definitely no connection to the internet.

The solution is a bit hacky: We know the total amount of strings to translate from parsing messages.pot or just looking into the weblate platform while preparing a release and then hard code it. It is 323 currently.
When using update-language-files.py helper script I can parse (via grep and wc somehow) each *.po file and look how many empty strings in there. Then I add the end of each po file a new string containing the completeness value.

msgid "__COMPLETE__"
msgstr "38.9"

Then I can use this simply like this:

menu_entry_label = '{} ({} % complete)'.format(language_name, _('__COMPLETE__'))

Of course I have to remove that string from all po files when doing update-language-files.py in the other direction. No big deal.

Update of the MockUp with your help menu sentence

translate_dialog drawio (2)

@buhtz
Copy link
Member Author

buhtz commented Aug 7, 2023

Where asking native speakers about improvement of the text. No errors, just slightly modifications.

Hello.

You have used Back In Time in the XYZ language a few times by now.

The translation of Back In Time into this language is only N % complete.
Regardless of your level of technical expertise, you can contribute to the
translation and thus Back In Time itself.

If you wish to contribute, please visit the translation platform. For further
assistance and questions, please visit the Back In Time website.

We apologize for the interruption, and this message will not be shown again.
This dialog is available at any time via the help menu.

Your Back In Time Team.

Some translations of this into foreign languages are here and here.

@buhtz
Copy link
Member Author

buhtz commented Aug 17, 2023

In my mock-up I do use a tab-widget to display the text in English and in its translated form.
Technically this is not easy to achieve without duplicating the text in the source code. That is IMHO not a good solution. I do asked on SO and on the python mailing list for a solution but do not have hope.

In the end I would say just using the translated OR the untranslated (as fallback) version of the text.

@aryoda
Copy link
Contributor

aryoda commented Aug 17, 2023

In my mock-up I do use a tab-widget to display the text in English and in its translated form.
Technically this is not easy to achieve without duplicating the text in the source code.

Do you want to present each and every text from the BiT source code in such a dialog or just the same "help us to translate" text in one dialog?

If the latter is the intention a solution like

original_text = "Hello, World!"
translated_text = _(original_text)

would make both languages accessible with duplicating anything

@buhtz
Copy link
Member Author

buhtz commented Aug 17, 2023

Do you want to present each and every text from the BiT source code in such a dialog or just the same "help us to translate" text in one dialog?

Just the help-to-translate.

original_text = "Hello, World!"
translated_text = _(original_text)

Was on my mind first, too. This wont work with the GNU gettext utilities because they do parse the second line only and do not know what original_text is. It is just ignored because there is no string in _().

@buhtz
Copy link
Member Author

buhtz commented Aug 21, 2023

Slightly modified the text.

Hello.

You have used Back In Time in the {lang} language
a few times by now.

The translation of Back In Time into {lang} is
{percent} complete. Regardless of your level of
technical expertise, you can contribute to the
translation and thus Back In Time itself.

Please visit the {translation_url}. If you wish
to contribute. For further assistance and questions,
please visit the {project_url}.
 
We apologize for the interruption, and this message
will not be shown again. This dialog is available at
any time via the help menu.

Your Back In Time Team.

@emtiu
Copy link
Member

emtiu commented Aug 25, 2023

In order to make it more clear that there's no online check for the translation completeness, we might use a wording like: "The translation of your installed version of Back In Time into {lang} …"

@buhtz
Copy link
Member Author

buhtz commented Aug 29, 2023

Closed via #1511 / d7e0297 .

@buhtz buhtz closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cosmetics appearance, icons, themes Discussion decision or consensus needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants