You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: development/language/guidelines.rst
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ If your language pack is denied and then resubmitted, it is placed at the end of
14
14
15
15
2) Submissions have to be complete. Partial translations are not allowed and will be automatically denied. E-mails, text files and theme-images must also be fully translated.
16
16
17
-
3) Language packs can contain five additional files (one mandatory and four optionals) that are not present in the British English language pack: ``LICENSE`` (mandatory), ``README.md`` (optional), ``AUTHORS.md`` (optional), ``VERSION.md`` (optional) and ``CHANGELOG.md`` (optional). You are free to write whatever you want in the ``README.md`` file, you can list all the authors and contributors of your language pack in the ``AUTHORS.md`` file, you can put the version of your language pack in the ``VERSION.md`` file and you can list the entire version history in the ``CHANGELOG.md`` file. The ``LICENSE`` file is automatically added during the upload process so you do not have to manually add the file. Its purpose is to inform the user what license is used. Language packs inherit phpBB's license of `GNU General Public License 2.0`_ and no additional or alternative licenses are allowed. All of these additional files must be placed in the ``language/{iso}/`` directory, next to the ``iso.txt`` file. Any other additional file(s) will be detected and your submission will be denied.
17
+
3) Language packs can contain three additional files (one mandatory and four optionals) that are not present in the British English language pack: ``LICENSE`` (mandatory), ``README.md`` (optional) and ``CHANGELOG.md`` (optional). You are free to write whatever you want in the ``README.md`` file and you can list the entire version history in the ``CHANGELOG.md`` file. The ``LICENSE`` file is automatically added during the upload process so you do not have to manually add the file. Its purpose is to inform the user what license is used. Language packs inherit phpBB's license of `GNU General Public License 2.0`_ and no additional or alternative licenses are allowed. All of these additional files must be placed in the ``language/{iso}/`` directory, next to the ``iso.txt`` file. Any other additional file(s) will be detected and your submission will be denied.
18
18
19
19
4) Submissions must have the following files and structure:
20
20
@@ -51,6 +51,7 @@ If your language pack is denied and then resubmitted, it is placed at the end of
51
51
profile.php
52
52
prune.php
53
53
search.php
54
+
storage.php
54
55
styles.php
55
56
users.php
56
57
email/
@@ -68,7 +69,6 @@ If your language pack is denied and then resubmitted, it is placed at the end of
68
69
topic_disapproved.txt
69
70
topic_in_queue.txt
70
71
topic_notify.txt
71
-
72
72
admin_activate.txt
73
73
admin_send_email.txt
74
74
admin_welcome_activated.txt
@@ -97,13 +97,14 @@ If your language pack is denied and then resubmitted, it is placed at the end of
97
97
report_deleted.txt
98
98
report_pm.txt
99
99
report_post.txt
100
+
test.txt
100
101
topic_approved.txt
101
102
topic_disapproved.txt
102
103
topic_in_queue.txt
103
104
topic_notify.txt
104
105
user_activate.txt
105
106
user_activate_inactive.txt
106
-
user_activate_passwd.txt
107
+
user_activate_password.txt
107
108
user_reactivate_account.txt
108
109
user_remind_inactive.txt
109
110
user_resend_inactive.txt
@@ -113,16 +114,15 @@ If your language pack is denied and then resubmitted, it is placed at the end of
113
114
bbcode.php
114
115
faq.php
115
116
app.php
116
-
AUTHORS.md (optional)
117
117
captcha_qa.php
118
118
captcha_recaptcha.php
119
119
cli.php
120
120
CHANGELOG.md (optional)
121
121
common.php
122
+
composer.json
122
123
groups.php
123
124
index.htm
124
125
install.php
125
-
iso.txt (
126
126
LICENSE
127
127
mcp.php
128
128
memberlist.php
@@ -132,40 +132,38 @@ If your language pack is denied and then resubmitted, it is placed at the end of
132
132
README.md (optional)
133
133
search.php
134
134
ucp.php
135
-
VERSION.md (optional)
136
135
viewforum.php
137
136
viewtopic.php
138
137
styles/
139
138
prosilver/
140
139
theme/
141
140
{iso}/
142
-
icon_user_online.gif
143
141
index.htm (optional)
144
142
stylesheet.css
145
143
146
-
5) Submissions should follow the recommendations in the `3.3 Translation (i18n/L10n) Guidelines`_ as closely as possible, especially the `3.3 Writing style`_.
144
+
5) Submissions should follow the recommendations in the `4.0 Translation (i18n/L10n) Guidelines`_ as closely as possible, especially the `4.0 Writing style`_.
147
145
148
146
6) All PHP and text files must be encoded in UTF-8 without BOM and a new line at the end of the file. Many modern text editors use this as a default setting, but we recommend checking it in your editor's settings. We recommend you use `Notepad++`_ or `PSPad`_, both lightweight and free.
149
147
150
-
7) The translation is mostly your work and you have a right to hold a copyright on the translation and put your name or the names of those on your team in the ``AUTHORS.md`` file.
148
+
7) The translation is mostly your work and you have a right to hold a copyright on the translation and put your name or the names of those on your team in the ``composer.json`` file in the authors section.
151
149
152
150
8) A maximum of 3 links can be included as an author credit in the footer, customisable via the ``'TRANSLATION_INFO'`` key in ``common.php``. Please note that the Translations Manager has complete discretion on what is acceptable as an author credit link.
153
151
154
-
9) Submissions have to be submitted as a single zip file. The Customisations Database will automatically name your uploaded language pack using the format ``languagename_versionnumber.zip``. For example, if a Brazilian Portuguese language pack author uploads an archive named ``Brasileiro_1.0.5.zip``, it will be automatically changed to ``brazilian_portuguese_1_0_5.zip``.
152
+
9) Submissions have to be submitted as a single zip file. The Customisations Database will automatically name your uploaded language pack using the format ``languagename_versionnumber.zip``. For example, if a Brazilian Portuguese language pack author uploads an archive named ``Brasileiro_4.0.5.zip``, it will be automatically changed to ``brazilian_portuguese_4_0_5.zip``.
155
153
156
154
10) The contribution description for you language pack in the Customisations Database should be translated into English in addition to your local language. This will facilitate the download of your translation by administrators who do not speak the language.
157
155
158
156
11) The contribution screenshot in the Customisations Database should only be the flag of the country where the primary spoken language is that of the language pack. For example, the flag of France for the French language.
159
157
160
-
12) Revision name in the Customisations Database should be left blank, contain the phpBB package version, and/or package release name (e.g. "**3.3.10 / Bertie’s New Translation**" for 3.3.10).
158
+
12) Revision name in the Customisations Database should be left blank, contain the phpBB package version, and/or package release name (e.g. "**4.0.0 / Bertie’s Future Translation**" for 4.0.0).
161
159
162
160
13) The Demo URL in the Customisations Database must be empty, unless you want to put a link to an international community (`officially`_ listed or not) related to the language of the contribution. For example, https://www.phpbb.nl/ as Demo URL concerning the `Dutch language`_ is allowed.
Copy file name to clipboardExpand all lines: development/language/validation.rst
+92-16Lines changed: 92 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Package Validation
42
42
==================
43
43
44
44
* Language packages must include all files that are included in the folders for
45
-
the English language. This includes the following folders:
45
+
the English language. This includes the following directories:
46
46
47
47
+ ``ext/phpbb/viglink/language/en/``
48
48
+ ``language/en/``
@@ -52,15 +52,13 @@ Package Validation
52
52
53
53
+ ``language/{iso}/LICENSE``
54
54
55
-
* Language packages may contain 4 more additional files:
55
+
* Language packages may contain 2 more additional files:
56
56
57
-
+ ``language/{iso}/AUTHORS.md``
58
57
+ ``language/{iso}/CHANGELOG.md``
59
58
+ ``language/{iso}/README.md``
60
-
+ ``language/{iso}/VERSION.md``
61
59
62
60
* No other additional files are allowed!
63
-
* All folders within the language-directories must contain an ``index.htm`` file (e.g. ``language/en/acp/index.htm``, ``language/en/index.htm``, ``styles/prosilver/theme/de/index.htm``, see the `Language Pack Submission Policy`_ for a complete list.).
61
+
* All folders within the language-directories must contain an ``index.htm`` file (e.g. ``language/en/acp/index.htm``, ``language/en/index.htm``, ``styles/prosilver/theme/en/index.htm``, see the `Language Pack Submission Policy`_ for a complete list.).
64
62
* An exception from this rule are the the directories for the viglink-translation and the directories which belong the phpBB package (e.g. ``language/``, ``styles/``).
65
63
66
64
File Validation
@@ -83,20 +81,95 @@ File Validation
83
81
before ``<?php``. ``.php`` files must **not** contain the closing tag ``?>``,
84
82
but just end with a new line
85
83
86
-
language/{iso}/iso.txt
87
-
----------------------
84
+
language/{iso}/composer.json
85
+
----------------------------
86
+
It is the main configuration file of your translation and language packages.
88
87
89
-
* The file must contain exactly 3 lines:
88
+
The ``composer.json`` from the default language `British English` looks like this:
90
89
91
-
#. English language name
92
-
#. Language name in the spoken language
93
-
#. Author(-group) information (Plaintext only, no links allowed)
90
+
.. code-block:: json
91
+
92
+
{
93
+
"name": "phpbb/phpbb-language-en",
94
+
"description": "phpBB Forum Software default language",
95
+
"type": "phpbb-language",
96
+
"version": "4.0.0-a1-dev",
97
+
"homepage": "https://www.phpbb.com",
98
+
"license": "GPL-2.0",
99
+
"authors": [
100
+
{
101
+
"name": "phpBB Limited",
102
+
"email": "operations@phpbb.com",
103
+
"homepage": "https://www.phpbb.com/go/authors"
104
+
}
105
+
],
106
+
"support": {
107
+
"issues": "https://tracker.phpbb.com",
108
+
"forum": "https://www.phpbb.com/community/",
109
+
"wiki": "https://wiki.phpbb.com",
110
+
"irc": "irc://irc.freenode.org/phpbb"
111
+
},
112
+
"extra": {
113
+
"language-iso": "en",
114
+
"english-name": "British English",
115
+
"local-name": "British English",
116
+
"phpbb-version": "4.0.0-a1-dev",
117
+
"direction": "ltr",
118
+
"user-lang": "en-gb",
119
+
"plural-rule": 1,
120
+
"recaptcha-lang": "en-GB"
121
+
}
122
+
}
123
+
124
+
Main block
125
+
^^^^^^^^^^
126
+
The main block of a language's ``composer.json`` file requires these six fields of information:
127
+
128
+
* ``"name":`` Must start with ``phpbb/phpbb-language-`` and be followed by the language iso code e.g.: ``phpbb/phpbb-language-de``
129
+
* ``"description":`` Must contain a short description for your translation e.g.: ``phpBB Forum Software language package Dutch (Casual Honorifics)``
130
+
* ``"type":`` Must be: ``"phpbb-language",``. Do not change this!
131
+
* ``"version":`` Should be the version number of the language package. This can be different than the phpBB-version it is made for.
132
+
* ``"homepage":`` You may include a URL to your website, or leave this field empty using empty quotes ``""``
133
+
* ``"license":`` Must be: ``"GPL-2.0",``. Do not change this!
134
+
135
+
Authors
136
+
^^^^^^^
137
+
Use this section to credit the authors and maintainers of this translation. You can add repeating blocks like this for each additional author.
138
+
139
+
.. code-block:: json
140
+
141
+
{
142
+
"name": "Person A",
143
+
"email": "mail@example.org",
144
+
"homepage": "https://www.example.org"
145
+
}
146
+
147
+
Support
148
+
^^^^^^^
149
+
Use this section to provide links to your websites, email, chat channels, etc. where you provide support for this translation.
150
+
151
+
Extra
152
+
^^^^^
153
+
The Extra block contains information required for the translation to function correctly within a phpBB installation.
154
+
Please do not omit any of these lines, and fill them out carefully.
155
+
156
+
* ``"language-iso":`` This must be your ISO code. In British English it is ``en``. This is also the same as the directory name e.g. ``language/en/``.
157
+
* ``"english-name":`` The English name of your language package e.g.: ``"German (Casual Honorifics)"``. (Formerly, this was the first line of ``language/{iso}/iso.txt``.)
158
+
* ``"local-name":`` The local name of your language package e.g.: ``"Deutsch (Du)"``. (Formerly, this was the second line of ``language/{iso}/iso.txt``.)
159
+
* ``"phpbb-version":`` This must represent an existing phpBB release version e.g.: ``4.0.1``. Individual naming is not allowed here!
160
+
* ``"direction":`` Use ``"ltr""`` for "left-to-right" languages (e.g.: Italian, Dutch, German) and ``"rtl"`` for right-to-left language (e.g.: Arabic).
161
+
* ``"user-lang":`` Input the user language code, e.g.: "de". (Formerly defined in the ``language/{iso}/common.php`` e.g.: ``'USER_LANG' => 'de',``.)
162
+
* ``"plural-rule":`` Input the plural rule number of your language. (Formerly defined in the ``language/{iso}/common.php`` e.g.: ``'PLURAL_RULE' => 1,``.) Check the `plurals`_ section for more details.
163
+
* ``"recaptcha-lang":`` Input the ReCaptcha-Language-Code here. (Formerly defined in the ``language/{iso}/captcha_recaptcha.php`` e.g.: ``'RECAPTCHA_LANG' => 'de',``.) Check `Google ReCaptcha`_ for further information which code to use.
164
+
165
+
.. note::
166
+
167
+
The ``composer.json`` must be valid JSON code. You can validate it using ``composer.phar``, see: `composer.json validation`_.
94
168
95
169
\*/index.htm
96
170
------------
97
171
98
-
The ``index.htm`` files in all folders must either be completly empty, or
99
-
contains the default html body:
172
+
The ``index.htm`` files in all folders must be either completely empty or contain the default html body:
100
173
101
174
.. code-block:: html
102
175
@@ -236,7 +309,10 @@ License
236
309
* All translations must be released under
237
310
`GNU General Public License 2.0 <http://www.opensource.org/licenses/gpl-2.0.php>`_
0 commit comments