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

Enhancements for managing dictionary catalog #16

Open
4 tasks
cedricus opened this issue Nov 22, 2020 · 3 comments
Open
4 tasks

Enhancements for managing dictionary catalog #16

cedricus opened this issue Nov 22, 2020 · 3 comments

Comments

@cedricus
Copy link

When a translation is added to the dictionary, it is tagged as fuzzy.

  • It could be very helpful to add a comment with the theme or plugin name where the translation comes from
    and

  • maybe a counter.

  • Then when the same translation is found,

  1. theme or plugin name is watched to check if it is not the same as before
  2. New theme or plugin name is added in the comment
  3. the counter is increased
  • A trigger for the counter, let's say 3 will remove the fuzzy tag of the translation. So when the same translation is found 3 times, we consider this is a popular translation.
    It still could be changed manually based on the glossary and consistency WordPress tools.
    But this will help a lot to automate dictionary catalog and time saving to build a wide dictionnary.
@cedricus
Copy link
Author

Should be easy with:
setDeveloperComments($developerComments)
setReference($reference)

Example workflow:

  1. First time translation with po merge-file on plugin wordpress-seo
    #, fuzzy
    #: wordpress-seo
    #. 1
    msgid "Categories"
    msgstr "Catégories"

  2. Second time translation with po merge-file on theme twenty-twenty
    #, fuzzy
    #: wordpress-seo twenty-twenty
    #. 2
    msgid "Categories"
    msgstr "Catégories"

  3. Third time translation with po merge-file on theme generatepress
    #, fuzzy
    #: wordpress-seo twenty-twenty generatepress
    #. 3
    msgid "Categories"
    msgstr "Catégories"

  4. Forth time translation with po merge-file on plugin contact-form-7 (trigger is reached so fuzzy is removed)
    msgid "Categories"
    msgstr "Catégories"

@maximejobin
Copy link
Contributor

What is the advantage of doing that? In my mind, the goal of the dictionary is to contain translations that we know are good and are manually validated.

Therefore, I don't see the point of the fuzzy flag. I truly think if we are not sure about a translation, it shouldn't be added.

If the goal is to have a dictionary fills itself automatically, I truly doubt that this is a good idea.

I'm open to discuss this further before we make a decision.

@cedricus
Copy link
Author

cedricus commented Dec 1, 2020

I agree with you po merge-file should be used only on 100% validated translated files.
So this feature should not be in po merge command but po merge-file command.

The main advantage would be:

  • to create a dictionary from scratch for a new language based on themes and plugins 100% translated.
  • to enhance an existing dictionary like fr-ca by an easier management (less time consuming).

Today when I merge a new theme to the dictionary, I have to remove manually all fuzzy flags manually which is time consuming for hundreds of lines.

But with this automation, it would be done automatically by reaching the magic number of themes+plugins using a given string.
I could mesure for 100 strings how much time it will save if it helps.

I will be available by phone for more detailed explanations.

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

No branches or pull requests

2 participants