Guest Post: This post was written by Eduardo Machuca-Torres following his experience fully translating Genesis into ES-MX. Thanks to Eduardo for the translations and the guest post!
I have been a WordPress user since around 2006 and a Genesis Framework user since 2011, when I bought the framework plus the Prose child theme.
Later I bought the Modern Portfolio Pro, Executive Pro and Author Pro child themes, which I have used for personal websites and blogs, all of them gone by now, except for the last one I am working on.
Anyway, it was this last blog that caused me visual pain and made me want to translate Genesis into my language. Let me explain.
Grammar Police
My blogs have been either in English or in Spanish. However, and especially since using Genesis, I have never cared much for the Spanish translation as many labels in the framework and child themes can be rewritten to your liking by using the Code Snippets provided by StudioPress.
And, WordPress has a good translation into Mexican Spanish (es-mx). Yes, there are a few words remaining in English when there is an Spanish equivalent that should be used, e.g. Plugins instead of “Complementos de software”.
By the way, software is an accepted word in Spanish, which leads me to mention that Spanish is a regulated language by the Real Academia Española or RAE (transl. Royal Spanish Academy).
All Spanish-speaking countries have their own language academies that fight coordinate and negotiate changes to the languages with the Royal Academy.
The RAE is the true Grammar Police. Since I was born, they have eliminated two letters from the alphabet, eliminated accent marks from words, changed the pronunciation of words, changed the spelling of words and in the year 2014, eliminated 2,793 words from the dictionary.
My guess is that they were also secretly involved with the elimination of Pluto as a planet.
Grammar lover
My native tongue is Spanish, and English is a second language that I learned by watching MTV and other US TV programs via a 10-feet satellite dish during the late 70’s and 80’s.
Even though I think I have a good command of the Spanish language because my teachers gave us endless homework and hit us in the hand with a wooden ruler if we made mistakes, I don’t like going around correcting people’s spelling or grammar errors.
However, when working in my last blog, with WordPress configured for the locale es-mx (Spanish-Mexico), after installing Genesis and the Author Pro child theme, I saw several translation errors in unusual places within the interface, and also started seeing the labels that I usually translated using code snippets, already translated into an error-happy Spanish.
My guess is that a native Spanish speaker, who missed most of the language classes, contributed to the translation, because the errors felt confident.
That is, an English speaker would have at least used Google Translate, whose translation errors are more subtle, for most of the time, and usually don’t show spelling errors like missing accent marks or putting accent marks where they don’t belong.
And there were also formatting errors, like a missing space between a word and a variable field, and word capitalization errors.
Thus, to ease the pain, I decide to translate Genesis into Mexican Spanish. And by Mexican Spanish I mean the locale es-mx, because there is not such a thing as Mexican Spanish and, at least in theory, we all should speak and write the same Spanish when doing it formally.
Yes, there are some key differences, like two-thirds of Latin American people that prefer to conjugate verbs using what is called Voseo instead of Tuteo, it is even used in some small regions in the south of Mexico, but still both sides can understand each other without problem.
In retrospect, I could have used the current Genesis Spanish-Spain translation (es-es) as a starting point, or even to copy/paste it, but it didn’t occur to me at the time.
Technically speaking, I have never wanted to use the Spanish-Spain translations usually available for themes or plugins because, to use them, I would need to set the locale of my WordPress install to es-es. And in Google’s eyes, that would geo target my site for Spain, and not for Mexico.
Translating Genesis Framework, Child Themes and Plugins
One has two options to translate the Genesis framework, child themes or plugins:
- Use the software Poedit. Available for Linux, Windows or macOS. You can work with the free version, but the Pro one gives you more features, if needed.
- Use the Genesis GlotPress server. Create a free account.
Using Poedit
Please note that I used Poedit to translate Genesis, but found some problems for my installation to use the translated files. I will explain at the end of this section.
To translate using Poedit, you first need to download the English language filename.pot from:
- Genesis: /wp-content/themes/genesis/lib/languages/genesis.pot
- Author Pro child theme, for instance: /wp-content/themes/author-pro/languages/author-pro.pot
- Plugins: /wp-content/your-plugin-name/languages/plugin-name.pot
Start Poedit and you will find the next welcome screen, choose “Create New Translation”:
Select from your Downloads folder the desired filename.pot file, e.g. genesis.pot, click Open and you will be asked to pick the language into which you are going to translate :
You will then be taken to the translation interface:
Just pick any phrase in English and write the translation in the translation box. On the right pane, you can select from suggested pre-translations, and use key shortcuts, like Ctrl+3, to quickly translate from “You are here: ” to “Usted está aquí: “.
However, that is a Pro version functionality that expires after a certain number of uses.
Use Ctrl+Enter to move to the next line to translate. Do not use Enter alone, as it will enter a new line character (\n) in the translation box, unless that is what you need.
When you click Save in the menu for the first time, it will ask you to select the folder in your hard drive where you want to save the file and the filename. In this case, the filename is automatically formatted as es_MX.po (for Spanish-Mexico).
Yet, when you go to that folder, you will find two files: es_MX.po and es_MX.mo.
For clarification:
- .pot is the template file, with the original strings and the translation strings empty.
- .po is the file with the translation strings.
- .mo is the Machine Object file, the binary file used by the program.
Formatting errors
You should take special care for punctuation and spaces and formatting strings. Poedit will give you a warning when the translated formatting doesn’t match the original, like shown in the image below, where I purposely added an extra semicolon and a space after, that do not exist in the English original.
Upload the translated files
Once you have partially or completely finished your translation, upload both .po and .mo files to the language folder that corresponds to the framework or child theme or plugin from where you downloaded the .pot file.
In theory, that is all that is needed to translate your theme or plugin.
Specific problem found with Genesis framework translation
I am not sure if this will happen with other frameworks, but after uploading my translated files to genesis/lib/languages/, my translation was not being shown in my WordPress install.
I cleared my browser’s cache, but nothing.
Then I searched and found some old posts about how to add some code to the functions.php file for Genesis not to override the translated files on a next update, which was not my current problem, and then found other posts that said one should use the Genesis Translation plugin, and then found others that said that the plugin was no longer necessary after “x” version of Genesis.
I found and tried some general code into functions.php that should make my translation work, but still nothing. The old translation was still showing.
By the way, I tried some code I found on the Internet because this was a new installation, I had no content and nothing to worry about if the site broke. Don’t do it if you have a production site.
Anyway, so I figured out the translation must have to be being pulled from somewhere else (the ether, maybe?).
I was kind of frustrated, having worked for two full days to completely translate Genesis. So, who ya gonna call? Not GhostBusters, but StudioPress support.
After a few back and forth messages, support directed me to the Genesis GlotPress server.
Using the GlotPress server
Go to the Genesis GlotPress server and register a new account or login.
Then click on the Translation menu item or click on Current translation projects to access the categories shown next.
You can select any of the framework or child themes or plugins projects to translate. I will use the Genesis framework version 3.3, which is the active version as of now.
Next, you will see a list of languages and their locales, e.g. Spanish (Spain) or Spanish(Mexico). Choose the language and locale that you want to translate.
In that screen you will also see how many items of the language(locale) have been already translated, plus other columns not shown in the picture for fuzzy translations, untranslated items count, and waiting for approval items.
Once in the selected language screen, you will have a list of the original English word and the box to translate it into your language.
Also, you can edit an already translated item by double-clicking on it, in case you think the current translation can be improved.
StudioPress, we have a problem
When I first registered into Genesis GlotPress, I saw the current error-happy translation but couldn’t find a way to upload my already translated files that I did with Poedit.
Yes, I could go line by line editing the current translation and adding the missing items, but it would take me forever to go through all 587 items again.
I remembered that during my messaging with support, they gave me some other links to check for the translation, and one of them was the GenesisWP Slack.
GenesisWP Slack
So, I registered at GenesisWP Slack and asked in the group if someone with admin permissions could upload my translated files, instead of me going again one by one editing the translation on the GlotPress server.
Someone quickly offered to help, I sent my .mo and .po files via the group messaging, and the translation was uploaded to the GlotPress server.
As a side note, if you go to the translation, it will be credited to the user that helped me with uploading the files. Please note that I am not complaining and that I am totally fine with it. Just so you know that you won’t see my username.
Genesis speaks Spanish-Mexico
After I was notified the translation was up, I went to my WordPress site and I had a message to update Genesis. I did it, and now I saw the labels and text with the translation I have made. One more triumph of man over machine.
And also the Child Themes
After I saw that the Genesis translation was working on my site, I went back to the GlotPress server to translate the Author Pro theme I was using.
Quickly browsing through all listed themes, I saw most of them had 10 to 25 items to be translated.
And so I did.
All 37 of them.
I was regretting it midway, but finished nonetheless.
The road to fame
This really caught me by surprise. All of a sudden, people on the GenesisWP Slack group were congratulating me for the Genesis framework translation work.
In all honesty, I never thought that would be something important, as I only did it because I couldn’t stand seeing the translation errors.
Anyway, the recognition felt nice and also the realization of having contributed to something of importance for the community.
Moreover, I was offered to become the Validator to the Genesis Spanish (Mexico) project, which I gladly accepted.
Being a validator means that I would have to review and approve any edits to the translation made by other users. Also, I can now import translated files in different formats, as shown in the image below.
Finally, in this road to fame, I was asked by StudioPress to write a blog post about my experience in the translation process. If you got this far, you are reading the outcome of that, which I hope you had enjoyed or found interesting.
After all this unexpected attention I have received, I am only waiting for the next knock on the door to open it and find me surrounded by reporters and lights and TV cameras.
Leaving the jokes aside, this experience has opened my eyes to the importance of contributing to Open Source or community projects, with whatever small knowledge or skill one may have.