Feature request: gender and plural in the autofill
-
I am a project editor responsible for translating your plugin into Brazilian Portuguese. As I use your plugin on almost every website I manage, this is very helpful.
However, the standard CPT label autofill feature has some limitations related to internationalization. That’s why I’m creating this topic so that we can discuss the possibility of making your plugin even more useful for foreign users.
Plural and singular
The first observation concerns plural and singular in some autocomplete strings.
I’ll give you an example from Portuguese:
In English, the phrase “Movie archives” uses the word “movie” in the singular. But in Portuguese, the most appropriate translation is in the plural. I will show step by step:
Movie -> Filme
Movies -> Filmes
archives -> arquivo (in Portuguese and with this meaning, this word is always translated in the singular)
Movie archive -> Arquivo de filmes (the noun is at the beginning with its attributes at the end. The word “de” indicates that the movie belongs to the archive)But if I use the autofill it will generate this wrong sounding label: Arquivos de filme
This happens with several other sentences like “no movie found in trash”, for example. Also, I suspect other languages may have similar issues.
One suggestion that I don’t know if it’s possible to implement, but that would solve this problem, would be to use WordPress Translate’s placeholder feature: https://snipboard.io/7qjLUt.jpg
Note that, in the translation, I need to insert the %s placeholder to define where the plugin will autofill.
We could define a placeholder for the label in the singular (%1$s) and another for the plural (%2$s) and we choose the most suitable one in the plugin’s translation. That way, regular users don’t even notice (it will just work) and people who know the language well can adapt it in the internationalization process. It would be possible?
Gender
The languages originating from Latin (and others as well) have a characteristic that is the gender of nouns.
For example, the word “Filme” (movie) is a masculine word, whereas the word “Página” (page) is a feminine word.
So “all movies” and “all pages” work fine in English just replicating “all _“. But, in Portuguese, the expression “all” must agree with the gender:
All Movies -> Todos os filmes
All Pages -> Todas as páginasI’m not sure how it works in other languages, but I believe some even accept a neutral third gender.
This is a problem for your plugin’s internationalization because it will always autofill with the same gender, regardless of the gender of the selected word. This involves a mandatory manual review.
To resolve this, I thought it would work like this:
1) The plugin detects the language of the WordPress installation
2) If it’s Brazilian Portuguese (or another supported language), it shows a selector next to the autofill button: “Is this word masculine or feminine?”
3) If the user chooses “female”, the plugin will autocomplete with female strings.
4) In the plugin translation, we translate the appropriate strings for each genreYou can add languages little by little, checking if the functionality is suitable for the community.
—
I thought it might be a good idea to document this suggestion here for you to consider. As I mentioned, I use your plugin to create dozens of CPTs on different sites and something like this would save a lot of time manually reviewing the labels.
Anyway, thanks a lot for the excellent plugin!
- The topic ‘Feature request: gender and plural in the autofill’ is closed to new replies.