-
-
Notifications
You must be signed in to change notification settings - Fork 20
Translate_Existing_Language
You need three things to translate Panopticon:
- Poedit, a free of charge, cross-platform, open source translation software.
- A plain text editor such as Notepad (Windows), Notepad++ (Windows), BBedit (macOS), gEdit (Linux / GNOME), Kate (Linux / KDE) or similar. Don't worry, this is just to copy file contents around.
- A GitHub account, to submit your work.
You can download and install Poedit on Windows, macOS, and Linux from its site. Linux users should best use the Snap package provided on Poedit's site, or compile their own, instead of using the package included with their distribution. The version of Poedit packaged with most distributions still works fine, but it's outdated, and some features described herein might not apply.
You need two files to translate Panopticon into your language:
- The POT file for the main language (English, United Kingdom).
- The PO file for the language you are translating in.
The naming of languages is explained in the File Structure page. If you come from the Joomla! world you'll immediately recognise the convention used, e.g. de-DE
for German (Germany) and de-AT
for German (Austria). If you come from the WordPress world, remember that the language name is followed by a dash and the two-letter ISO country code.
You can download both files from Panopticon's GitHub repository.
To open a translation for editing, open Poedit and click on Browse Files.
Select your PO file (in this example, I selected el-GR.po
for the Greek language) and click on Open. You will then see the translation interface.
The very first time you open Poedit you have to change a few of its configuration options. Remember to open your PO file first, otherwise you do not see the necessary menu item!
Go to the Edit, Preferences menu item.
In the General tab enter the following.
- Name: your full name
- Email: your email address
- Check spelling: checked
In the Advanced tab select the following.
- Line endings: UNIX (recommended)
- Preserve formatting for existing files: checked
Click on OK.
This ensures that when you save your translation source file nothing will be broken.
Before you start translating, you should always update your language's PO file with the changes (added, changed, and removed language strings) in the POT file.
To do that, go to Translation, Update From POT File menu item. Select the panopticon.pot
file and click on Open.
If there are deleted language strings you will see that the menu item Translation, Purge deleted translations is available (not grayed out). Click on it to remove all obsolete language strings.
ℹ️ This feature is available since Panopticon 1.0.6
In your Panopticon installation create the file user_code/bootstrap.php
with the following contents:
<?php
\Akeeba\Panopticon\Helper\LanguageTools::convertAllToIni();
Then, upload your language's PO file into your Panopticon installation's languages
folder.
Panopticon will automatically convert the PO file into an INI file, which means that you can use it with your Panopticon installation.
After you are done translating you will have an updated PO file. You need to submit that file to the Panopticon repository for the bundled language files to be updated. This is done by creating Pull Requests.
❗ Do NOT submit a new discussion or issue with your updated PO file, or comment to an existing one attaching or linking to your updated file. The only acceptable way to submit your translation is through a Pull Request. This is important for maintaining a correlation of who changed what in Panopticon, including its languages. This becomes extremely important when someone disagrees with a translation string. Such disputes can only be resolved by notifying the person who submitted the translation, and the only way to do that is to have the correlation between change and person making it through the acceptance of Pull Requests.
It may sound daunting, but there's a reason we chose to host our code on GitHub. It makes it fairly simple for non-developers to submit Pull Requests with single file changes.
First, log into GitHub and go to the languages
folder inside Panopticon's repository.
Click on the PO file you want to change. On that page you will see a pencil icon with a downwards pointing arrow next to it. Click on it and select Edit in place.
If you have never done this before GitHub will tell you that you need to “fork” the repository.
Don't worry! Just click on the bright green Fork this repository button. Magic takes place in the background.
You will then see a text editor in your browser.
Open your PO file in your plain text editor, e.g. Notepad on Windows.
Copy all the file contents into your clipboard. How? On Windows and Linux, click anywhere inside the text and press CTRL-A followed by CTRL-C. On macOS, click anywhere inside the text and press CMD-A followed by CMD-C.
Back to your browser, click inside the editor, then select and delete all the text (CTRL-A followed by BACKSPACE on Windows and Linux, CMD-A followed by DELETE on macOS). Then, paste the contents of your clipboard (CTRL-V on Windows and Linux, CMD-V on macOS).
Give it a quick glance over to make sure you have pasted the right text. Then, click on the green “Commit changes...” button above the editor.
You will see a message box where you can enter some optional information. You don't need to change anything. Just click on “Sign off and propose changes”.
That's it! You have submitted a pull request to the Panopticon project with an update to your language file. The developers will merge it within a couple of days, and update the INI files a few minutes to hours later.
As noted above, the only acceptable method for submitting translations is through a Pull Request. Please do not start a new discussion or issue, or comment on an existing discussion or issue with a copy or link to your updated translation. Do not submit issues or discussions with changed language strings, either. These methods will NOT result in the translation being updated and will be replied to with a link to this page. As explained, the reason for the Pull Requests is that they maintain correlation between the translation and the translator. This is very important when there is a dispute about the best way to translate something in a language we don't speak and don't manage.
We understand that nobody has infinite time to do a full translation from start to finish in one sitting. You will need to take breaks, and come back to it whenever you have more time. Please do not submit a translation source file if you know you are going to be translating some more in the next 3–4 business days. By the time we accept your Pull Request you'll be coming with a new one, which at best is unnecessary work, and at worst it can cause even more work resolving merge conflicts.
Do not submit INI files directly. The only acceptable exception is if it's a new file, and you have cleared that with us. We will need to merge your translation INI file, then convert it to a PO file, and update the repository. This takes a bit of extra time, hence the need to clear it with us first to avoid that additional work coming to us at an inopportune moment.
Do not just pass all strings through a machine translator software / service such as Google Translate, DeepL, etc. The quality of machine translations is rarely acceptable for short strings like software translation files. Users detected doing this will be banned from the Panopticon repository. It is, however, okay to use machine translation to get to a good starting point AS LONG AS you proofread and edit every single language string. If there are strings you have not had the time to proofread yet, please remove them from your translation. A bad translation is worse than no translation at all.
Aside: Back in the Joomla! 1.0 days (2005-2007) an unfortunate misunderstanding led to the english string “FTP Directory” to be translated to the equivalent of “FTP company manager”. Most users had no idea what that was and left it empty. As a result, Joomla! was perceived to be broken among Greek users of cheap hosting on which Joomla! required the FTP layer to be set up to work correctly. It took years for people to figure out that this was the reason. Someone confusing "directory" with "director" was enough for a CMS to get a bad reputation in two countries (Greek and Cyprus), leading hordes of users to WordPress instead. So, yes, a bad translation is worse than no translation at all!
Finally, please mind your tone of voice, grammar, and spelling.
Panopticon's tone of voice is casual office. It's neither formal, nor colloquial. You should translate strings using the same tone of voice you'd be using to talk to your higher-up in an office environment. You should use neither the formulaic speech of academia and boardroom, nor the informal speech used with your friends. And, for the love of Cthulhu, don't try to be prosaic when clarity will do just fine.
In languages which use the second plural person to convey respect when talking to someone (e.g. “Sie” in German, “vous” in French, “εσείς” in Greek), whereas the second singular person conveys familiarity (e.g. “du” in German, “tu” in French, “εσύ” in Greek) you should always use the second plural person. If your culture does not use this convention, as is common in most of Scandinavian countries (at least that's what reading Scandinavian crime thrillers led me to believe), you should use whichever sounds more natural to you, but please be consistent.
When translating computer-related terms, please exercise your best judgement whether your country's people are more likely to understand the translated or the English term. For example, “email” is usually understood better untranslated, except in France where the translated term “couriel” is far more likely to be understood. Sometimes you may have to use colloquial terms for people to understand what you mean. For example, the term "at-sign" (referring to the character @
) should never be translated in Greek as “σύμβολο του προς” because nobody understands what it is. Instead, it would have to be translated as “παπάκι” (literally: little duckling) which is the colloquial term for the sign that everyone understands.
Documentation Copyright ©2023–2024 Akeeba Ltd.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
You can also obtain a copy of the GNU Free Documentation License from the Free Software Foundation
- Overview pages
- Working with sites
- Site Overview
- Backup Management with Akeeba Backup Pro
- Security Management with Admin Tools Pro
- Scheduled Update Summary
- Scheduled Action Summary
- Backup Tasks
- Scanner Tasks
- System Configuration
- Managing Sites
- Mail templates
- Users and Groups
- Tasks
- Log files
- Update Panopticon
- Database Backups
- Fixing your session save path
- The .htaccess file
- Advanced Customisation (user code)
- Plugins
- Custom CSS
- Custom Templates
- Advanced Permissions
- .env For Configuration