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

Add a translations' bulk update tool for the GTE in the Translation Consistency #182

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

amieiro
Copy link
Contributor

@amieiro amieiro commented Dec 1, 2023

One of the most requested functionalities by GTEs is the massive update of translations. We talked about this in this P2: Bulk updates in the Translation Consistency.

This PR adds a new tool, only available for the GTE of each locale, to make bulk updates:

image

If the logged user is not a GTE, she doesn't get the bulk update form:

image

Once the GTE makes a bulk update, she gets a list with all the translations and a link to review each new translation.

image

if you have updated all the strings with the same translation, you are going to see a message like this:

image

If all the translations are equal, the GTE will not see any form:

image

Testing

I have tested this PR with the emoji language, to avoid putting fake translations in a real locale. If you are emoji GTE, you can use the next links to test the functionality (if you are GTE in another language, feel free to test it there).

To test it:

Errors

If the bulk update detects some error, it doesn't make the bulk update and it shows a message like this:

image

@NekoJonez
Copy link

While I can't read the code and can't give you feedback on that... I love the way how Vlad's WPGP tools does it.

image

It also blocks replacements when it's saying "plugin name" or "theme name"
It also auto closes the tabs afterwards.

It also gives a log file of all the replaced links so, if you did a replace by mistake... you can always go to the log and fix your mistakes easily.

Maybe give that a look and who knows, you might have some idea's to improve this.

Now, don't misunderstand me... I'm not shooting down this ... this will be an amazing feature... But, WPGP tools has an excellent implementation already and I think we can learn from each other here.

@psmits1567
Copy link

Can this also be done for 'Formal' as that includes a lot of crap as well.
E.g. When started does it also take Formal lines into the query???

@NekoJonez
Copy link

Can this also be done for 'Formal' as that includes a lot of crap as well.
E.g. When started does it also take Formal lines into the query???

This will be only for Spanish and German....

:P I gest, it will be part of the Consistency tool so for all locales and their sublocales.

@psmits1567
Copy link

And Dutch nl_NL
Currently the consistency does not handle Formal for Dutch
Tested that but still wrong translations are present, so the query does not include formal

@amieiro
Copy link
Contributor Author

amieiro commented Dec 1, 2023

User interface

When I started developing this improvement, I reviewed the WPGPTools developed by @vlad-timotei and I liked his approach. I developed something similar, but with checkboxes. After an internal review, we realized that this layout was prone to errors made by the GTE, so we changed the design to one based on select fields, where you have to decide which translation you want for each case, resulting in fewer errors. I think this new user interface is more usable and less error-prone.

I like the exception to not including the translation of plugin and theme names.

This implementation doesn't open any tab.

Logs

Related with the logs, we have two different logs available:

  1. One available just when the GTE updates the translations. This information is only available when the GTE makes the update.

image

  1. polyglots-consistency-bulk-updates Matrix room, where you can look for logs. The full address for this room is polyglots-consistency-bulk-updates:community.wordpress.org. As we are moving from Slack to Matrix, this tool will not notify to Slack.

image

Duplicated locales

The duplicate locales' problem should be resolved in a different PR. There is a Track ticket for this problem.

The current PR will work for all locales available in the "Locale" dropdown, so this will not be a problem.

@amieiro
Copy link
Contributor Author

amieiro commented Dec 1, 2023

I have an update to avoid updating the names and authors of themes and plugins.

Screenshot in the browser:

image

Screenshot in Matrix:

image

cc @NekoJonez

@psrpinto psrpinto self-requested a review March 5, 2024 15:28
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

3 participants