Convert PT AO90 for GlotPress
by Pedro Mendonça on WordPress.org
Language tool for GlotPress to convert text according to the Portuguese Language Orthographic Agreement of 1990 (PT AO90).

Translation table with gray root translations and green automatically converted strings, with highlighted conversion diffs
This plugin for GlotPress customizes the default behavior of the Portuguese (Portugal) Locales, allowing you to automatically convert the approved/current strings in Portuguese (Portugal) to its variant of Portuguese (Portugal, AO90).
It keeps the Portuguese (Portugal) root translations automatically converted and synced with its Portuguese (Portugal, AO90) variant translations within your GlotPress install.
Optionally it’s possible to disable the Portuguese (Portugal, AO90) variant translations editing, approval and importing, making it read-only.
The only translations added to the Portuguese (Portugal, AO90) variant translation set are those which are different from the Portuguese (Portugal) root translation.
The strings that don’t need any conversion remain untranslated on the variant, falling back to the root Locale.
This plugin was heavily inspired by the Serbian Latin solution for transliteration of Serbian Cyrillic locale from translate.wordpress.org.
The language conversion uses the open source tool Convert PT AO90 to replace entire words from a prebuilt list.
Features
- Check for active GlotPress.
- Check for existent
ptroot andpt-ao90variant translation sets. - Convert
currentPortuguese (Portugal) root translations and add to the Portuguese (Portugal, AO90) variant translations. - Delete variant unused translations instead of keeping as
rejected,fuzzy,old. - Delete
currentvariant translation if a new root translation (sameoriginal_id) is added and doesn’t need conversion. - Sync button for GlotPress administrators to force convert the complete translation from root set to variant set.
- Highlight the differences in the automatically converted texts.
- Read-only mode: Use the filter
gp_convert_pt_ao90_editto disable editing, approval and importing translations in thept-ao90variant. - Optionally you can always save the translations to the Variant, this overrides the fallback to the root Locale. Return
truein the new filtergp_convert_pt_ao90_always_create_variant_translation. - Conversion highlight: Use the filter
gp_convert_pt_ao90_showdiffto optionally disable the conversion diff highlight. - Supports GlotPress 3.0.0-alpha.4, with the real variants and fallback feature.
- Supports GlotPress 4.0.0 (current development), without the real variants and fallback feature.
- Supports Traduttore for also schedule the language-pack build for the converted variant.
Requirements
- GlotPress 3.0.0-alpha.4 with Variants support.
-
GlotPress 4.0.0 without Variants support.
-
Translation set (root):
Portuguese (Portugal)- Locale =
pt; - Slug =
default;
- Locale =
-
Translation set (variant):
Portuguese (Portugal, AO90)- Locale =
pt-ao90; - Slug =
default;
- Locale =