Skip to content

Commit 22f3b01

Browse files
authored
Merge pull request #275 from Crizz0/update-lang-docs-for-phpBB4.0
Adds information for composer.json and updates links to phpBB 4.0
2 parents 74a9a3a + ce8585c commit 22f3b01

File tree

3 files changed

+106
-32
lines changed

3 files changed

+106
-32
lines changed

development/language/guidelines.rst

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ If your language pack is denied and then resubmitted, it is placed at the end of
1414

1515
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.
1616

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.
1818

1919
4) Submissions must have the following files and structure:
2020

@@ -51,6 +51,7 @@ If your language pack is denied and then resubmitted, it is placed at the end of
5151
profile.php
5252
prune.php
5353
search.php
54+
storage.php
5455
styles.php
5556
users.php
5657
email/
@@ -68,7 +69,6 @@ If your language pack is denied and then resubmitted, it is placed at the end of
6869
topic_disapproved.txt
6970
topic_in_queue.txt
7071
topic_notify.txt
71-
7272
admin_activate.txt
7373
admin_send_email.txt
7474
admin_welcome_activated.txt
@@ -97,13 +97,14 @@ If your language pack is denied and then resubmitted, it is placed at the end of
9797
report_deleted.txt
9898
report_pm.txt
9999
report_post.txt
100+
test.txt
100101
topic_approved.txt
101102
topic_disapproved.txt
102103
topic_in_queue.txt
103104
topic_notify.txt
104105
user_activate.txt
105106
user_activate_inactive.txt
106-
user_activate_passwd.txt
107+
user_activate_password.txt
107108
user_reactivate_account.txt
108109
user_remind_inactive.txt
109110
user_resend_inactive.txt
@@ -113,16 +114,15 @@ If your language pack is denied and then resubmitted, it is placed at the end of
113114
bbcode.php
114115
faq.php
115116
app.php
116-
AUTHORS.md (optional)
117117
captcha_qa.php
118118
captcha_recaptcha.php
119119
cli.php
120120
CHANGELOG.md (optional)
121121
common.php
122+
composer.json
122123
groups.php
123124
index.htm
124125
install.php
125-
iso.txt (
126126
LICENSE
127127
mcp.php
128128
memberlist.php
@@ -132,40 +132,38 @@ If your language pack is denied and then resubmitted, it is placed at the end of
132132
README.md (optional)
133133
search.php
134134
ucp.php
135-
VERSION.md (optional)
136135
viewforum.php
137136
viewtopic.php
138137
styles/
139138
prosilver/
140139
theme/
141140
{iso}/
142-
icon_user_online.gif
143141
index.htm (optional)
144142
stylesheet.css
145143
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`_.
147145

148146
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.
149147

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.
151149

152150
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.
153151

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``.
155153

156154
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.
157155

158156
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.
159157

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).
161159

162160
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.
163161

164-
.. _Customisations Database: https://www.phpbb.com/go/customise/language-packs/3.3
162+
.. _Customisations Database: https://www.phpbb.com/go/customise/language-packs/4.0
165163
.. _Language Packs Database: https://www.phpbb.com/languages/
166164
.. _GNU General Public License 2.0: http://www.opensource.org/licenses/gpl-2.0.php
167-
.. _3.3 Translation (i18n/L10n) Guidelines: https://area51.phpbb.com/docs/33x/coding-guidelines.html#translation
168-
.. _3.3 Writing style: https://area51.phpbb.com/docs/33x/coding-guidelines.html#writingstyle
165+
.. _4.0 Translation (i18n/L10n) Guidelines: https://area51.phpbb.com/docs/40x/coding-guidelines.html#translation
166+
.. _4.0 Writing style: https://area51.phpbb.com/docs/40x/coding-guidelines.html#writingstyle
169167
.. _Notepad++: https://notepad-plus-plus.org/
170168
.. _PSPad: http://www.pspad.com/en/
171169
.. _officially: https://www.phpbb.com/support/intl/

development/language/plurals.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ unexpected results if any keys are missing or out of order.
216216
Credits
217217
=======
218218
The system is based on
219-
`Mozilla <https://developer.mozilla.org/en/Localization_and_Plurals>`_, which
219+
`Unicode.org`_, which
220220
uses the "Plural Rules and Families" from
221-
`GNU gettext documentation <http://www.gnu.org/software/gettext/manual/html_node/gettext_150.html#Plural-forms>`_.
221+
`GNU gettext documentation <http://www.gnu.org/software/gettext/manual/html_node/gettext_150.html#Plural-forms>`_ and is used e.g. by Mozilla.
222222

223223
.. _Unicode.org: https://www.unicode.org/cldr/charts/43/supplemental/language_plural_rules.html

development/language/validation.rst

Lines changed: 92 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Package Validation
4242
==================
4343
4444
* 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:
4646
4747
+ ``ext/phpbb/viglink/language/en/``
4848
+ ``language/en/``
@@ -52,15 +52,13 @@ Package Validation
5252

5353
+ ``language/{iso}/LICENSE``
5454

55-
* Language packages may contain 4 more additional files:
55+
* Language packages may contain 2 more additional files:
5656

57-
+ ``language/{iso}/AUTHORS.md``
5857
+ ``language/{iso}/CHANGELOG.md``
5958
+ ``language/{iso}/README.md``
60-
+ ``language/{iso}/VERSION.md``
6159

6260
* 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.).
6462
* 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/``).
6563

6664
File Validation
@@ -83,20 +81,95 @@ File Validation
8381
before ``<?php``. ``.php`` files must **not** contain the closing tag ``?>``,
8482
but just end with a new line
8583

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.
8887

89-
* The file must contain exactly 3 lines:
88+
The ``composer.json`` from the default language `British English` looks like this:
9089

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`_.
94168

95169
\*/index.htm
96170
------------
97171

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:
100173

101174
.. code-block:: html
102175

@@ -236,7 +309,10 @@ License
236309
* All translations must be released under
237310
`GNU General Public License 2.0 <http://www.opensource.org/licenses/gpl-2.0.php>`_
238311

239-
.. _Customisation Database: https://www.phpbb.com/go/customise/language-packs/3.3
240-
.. _Language Pack Submission Policy: https://area51.phpbb.com/docs/dev/3.3.x/language/guidelines.html#language-pack-submission-policy
312+
.. _Customisation Database: https://www.phpbb.com/go/customise/language-packs/4.0
313+
.. _Language Pack Submission Policy: https://area51.phpbb.com/docs/dev/master/language/guidelines.html#language-pack-submission-policy
241314
.. _officially: https://www.phpbb.com/support/intl/
242-
.. _Dutch language: https://www.phpbb.com/customise/db/translation/dutch_casual_honorifics/
315+
.. _Dutch language: https://www.phpbb.com/customise/db/translation/dutch_casual_honorifics/
316+
.. _Google ReCaptcha: https://developers.google.com/recaptcha/docs/language
317+
.. _plurals: https://area51.phpbb.com/docs/dev/master/language/plurals.html
318+
.. _composer.json validation: https://getcomposer.org/doc/03-cli.md#validate

0 commit comments

Comments
 (0)