1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-05 14:17:26 +02:00

Doc: Plugin translations

This commit is contained in:
Jakub Vrana
2025-04-08 11:00:31 +02:00
parent 0cb41c63c7
commit 7908d86c9f

View File

@@ -244,6 +244,17 @@ Adminer generates simple HTML and styles it with basic CSS, respecting user pref
Users can customize styles via `adminer.css`.
If styling an element without a class name is difficult, I generally accept patches that add meaningful class names.
## Translations
All user-visible strings should be translatable using `lang('')`.
This extracts them for translation and applies translations if available.
Translations are updated via [lang.php](/lang.php), which also checks for style consistency, such as matching punctuation.
Plurals are stored as arrays, with selection logic handled in [lang.inc.php](/adminer/include/lang.inc.php).
Plugins extending [`Adminer\Plugin`](/adminer/include/plugin.inc.php) can use `$this->lang()` and store translations in `static $translations = array('en' => array('' => 'Plugin description'))`.
The website translations are managed at https://www.adminer.org/en/translations/.
## Compilation
Adminers source code is divided into a manageable number of reasonably small files.
@@ -273,15 +284,6 @@ I do not review logs with this information, and no one else has access to the se
A [plugin](/plugins/version-noverify.php) disables version checks, but users should verify versions by other means to ensure security updates.
There's also a [plugin](/plugins/version-github.php) checking for new versions [from GitHub](https://github.com/vrana/adminer/releases).
## Translations
All user-visible strings should be translatable using `lang('')`.
This extracts them for translation and applies translations if available.
Translations are updated via [lang.php](/lang.php), which also checks for style consistency, such as matching punctuation.
Plurals are stored as arrays, with selection logic handled in [lang.inc.php](/adminer/include/lang.inc.php).
The website translations are managed separately via Google Sheets.
## Commits
Every commit should do only one thing and be as small as possible.