john-lang-86 / lj-maintenance-mode

Simple maintenance mode wordpress plugin.
https://plugins.itsluk.as/maintenance-mode/
0 stars 1 forks source link

Add New Language Translations 2.5.2 #6

Closed john-lang-86 closed 2 years ago

john-lang-86 commented 2 years ago

Pre-requisite #8

Add missing language translations for new strings added in the settings page in 2.5, 2.5.1 and 2.5.2.

... time to RTFM and learn 'PO Edit'.

Observation 1: Found the maintenance mode plugin official language pack site.

Situation 1: There is a clear note about 'be careful with machine translations' as they are generally not an acceptable practice and that they don't even want them to be submitted for review. Ok, good to know for the core language packs supported by the official polyglots teams. So, I just won't submit any of this to them, in alignment with their desires.

Conclusion 1: Let's explore the quality of reverse translation and/or the PoEdit Translation Memory capability and/or the already translated terminology in the official WordPress core files (a small tweak to use their domain, could be an option, maybe?).

Situation 2: A Kinsta article on Multilingual WordPress indicates there are 12 primary languages that should be included if we want to cover a large portion of the user community. kinsta-native-language-research

Situation 3: The Stripe payment utility supports these languages. If a language has enough traffic and financial throughput then it should also have a lot of WordPress sites ... that need a localised 'Maintenance Mode' plugin in their language. :-)

Conclusion 3: Let's make sure they are all covered, if possible.

Situation 4: As-at 26/01/2022, only 138 locales (language_region) of 205 have > 50% translation status.

Conclusion 4: Let's cross-reference against the WordPress Statistics for Locales to align with locales that are actively contributing/translating ... allowing this activity to focus on the wider and active user communities.

  1. Focus on installation statistics, in descending ranked order; then
  2. Focus on up-to-date translations, which indicates an active community.

Tip: The PO and MO files should have the WordPress plugin slug as the file prefix ... lj-maintenance-mode-en_US.po.

Tip: PoEdit Pro uses DeepL service for pre-translation capability. Yes, please, this is what should be used.

Tip: Each .po file can leverage the 'Translation' -> 'Update from Source Code' menu option; when two configuration options are in place to be able to scan the PHP source code that is the WordPress plugin.

  1. Navigate 'Translation' -> 'Properties' menu. Click on the 'Sources Paths' tab. Use the 'Paths' text area and its [+] button to enter the directory/folder where the WordPress source code is available to you.
  2. Navigate 'Translation' -> 'Properties' menu. Click on the 'Sources Keywords' tab. Enter these 'Additional Keywords'.
    • __
    • _e
    • _n:1,2
    • _x:1,2c
    • _ex:1,2c
    • _nx:4c,1,2
    • esc_attr__
    • esc_attr_e
    • esc_attr_x:1,2c
    • esc_html__
    • esc_html_e
    • esc_html_x:1,2c

Situation 5: The DeepL machine translations don't really like the sprintf( %s ) embedded approach, assuming this is because the %s is a technology injection for pre-processors to parse in a run-time environment, which really has nothing to do with locales (language_region) native language spoken as part of day-to-day living. While paragraphs are the recommended solution, seriously consider treating the %s like the markup recommendation (aka break it up into smaller translations)(???).

Conclusion 5-1: Ok, this approach (to remove the %s technology injections) has now been confirmed as a decent way forward. Way more of the pre-translation requests are coming back with a 100% completed list of translation values filled in. This first step of providing a pre-translation will make it a lot easier for a native speaker of each locale (language_region) to cast their eye over the pre-translations and spot where the online machine learning proposals were less than ideal.

Conclusion 5-2: Ok, the other approach to improve the pre-translation quality is to improve the "Readability" of the original English. Seems like an obvious statement, but it was not something that initially stood out at the beginning of this pre-translation experiment. Services like www.grammarly.com and www.readable.com were helpful as a pre-requisite step to improve the original content before engaging the pre-translation service.

Solution 6: As-at 26/01/2022, this is the WordPress statistics for locales (language_region) installed.

Primary language. The first part of a locale (language_region) that are part of the above list (installation statistics), but not directly identified.

Solution 7: As-at 06/02/2022, there are 42 locales (language_region) that have a WordPress 5.9 100% translation status. These ones are not included in the above-prioritised lists and should be added as there is an active community.

Solution 8: As-at 06/02/2022, there are 27 locales (language_region) that have a WordPress 5.9 95% translation status. These ones are not included in the above-prioritised lists and should be added as there is an active community.

Solution 9: As-at 06/02/2022, there are 11 locales (language_region) that have a WordPress 5.9 90% translation status. These ones are not included in the above-prioritised lists and should be added as there is an active community.

Solution 10: As-at 27/03/2022, there are quite a few languages supported by the Stripe financial payment processing service.

Solution 11: While these locales (language_region) were not prioritised for the above specific and targeted reasons, they have been done because the PoEdit applications pre-translate service did provide a complete set of translation responses. While this is not a good enough reason to ensure quality, it is good enough for this learning experiment in understanding the current state of pre-translation service capability, at a high level.

mpQadir commented 2 years ago

Saraiki is an important language, so Saraiki language be added.

john-lang-86 commented 2 years ago

mpQadir

I've been unable to leverage the Google/DeepL translators for a few locales (language_region) and skr Saraiki is one of them.

Here is the .pot file being used for the above documentation of my exploration in learning about .pot, .po and .mo files for WordPress plugins (with Po Edit Pro appication & services). With an intentional focus to understand how well the online translators have improved.

lj-maintenance-mode.pot.zip

If you are able to assist with providing a skr Saraiki .po file before the Milestone 2.5.2 due date on 28 March 2022 then it can be added to the 100+ languages to be submitted to the plugin author for review and inclusion.

mpQadir commented 2 years ago

Dear, Here are some files. For Saraiki.po.zip Hoping that it will help.

john-lang-86 commented 2 years ago

Hi mpQadir, Thank you for the Saraiki zip file. There appears to be quite a lot of good effort put into these PO files for the core WordPress translation.

Unfortunately, I could not make much use of those files due to there being only a very small number of matching phrases to the ones in the updated Maintenance Mode plugin. I did start down the path of trying to put it together, like a jigsaw puzzle, by translating individual words into phrases but the result was patchy and still left quite a few phrases un-translated.

At this point, I'll be moving on from this specific language and leaving it to someone who is a native speaker of Saraiki to do the specific translation of the Maintenance Mode phrases.

Thanks again for providing the zip file to at least allow me the opportunity to see if it could be put together. Kind regards, John