Skip to content

Commit 21569e6

Browse files
authored
Inserting BCP47 language tag (#40)
* Updated schema en/it, examples * Fixes #2
1 parent e1c2f5a commit 21569e6

7 files changed

Lines changed: 33 additions & 26 deletions

File tree

docs/en/example/publiccode.minimal.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ developmentStatus: development
1515
softwareType: "standalone"
1616

1717
description:
18-
eng:
18+
en:
1919
localisedName: medusa # Optional
2020
genericName: Text Editor
2121
shortDescription: >
@@ -43,4 +43,4 @@ maintenance:
4343
localisation:
4444
localisationReady: yes
4545
availableLanguages:
46-
- eng
46+
- en

docs/en/example/publiccode.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ intendedAudience:
4747
- us
4848

4949
description:
50-
eng:
50+
en:
5151
localisedName: Medusa
5252
genericName: Text Editor
5353
shortDescription: >
@@ -104,10 +104,10 @@ maintenance:
104104
localisation:
105105
localisationReady: yes
106106
availableLanguages:
107-
- eng
108-
- ita
109-
- fra
110-
- deu
107+
- en
108+
- it
109+
- fr
110+
- de
111111

112112
dependsOn:
113113
open:

docs/en/schema.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,16 +370,17 @@ software.
370370

371371
**Note:** since all the strings contained in this section are
372372
user-visible and written in a specific language, you **must** specify
373-
the language you are editing the text in (using `ISO
374-
639-2 <https://en.wikipedia.org/wiki/ISO_639-2>`__ alpha-3 codes) by
375-
creating a sub-section with that name.
373+
the language you are editing the text in (using the IETF
374+
`BCP 47 <https://tools.ietf.org/html/bcp47>`__ specifications) by
375+
creating a sub-section with that name. The primary language subtag cannot be
376+
omitted, as mandated by the BCP 47.
376377

377378
An example for English:
378379

379380
.. code:: yaml
380381
381382
description:
382-
eng:
383+
en:
383384
shortDescription: ...
384385
longDescription: ...
385386
@@ -711,12 +712,14 @@ than one language.
711712
Key ``localisation/availableLanguages``
712713
'''''''''''''''''''''''''''''''''''''''
713714

714-
- Type: list of `ISO 639-2 <https://en.wikipedia.org/wiki/ISO_639-2>`__
715-
alpha-3 codes
715+
- Type: list of IETF BCP 47 language tags
716716
- Presence: mandatory
717+
- Example: ``"it"``, ``"en"``, ``"sl-IT-nedis"``
717718

718719
If present, this is the list of languages in which the software is
719720
available. Of course, this list will contain at least one language.
721+
The primary language subtag cannot be omitted, as mandated by the
722+
`BCP 47 <https://tools.ietf.org/html/bcp47>`__.
720723

721724
Section ``dependsOn``
722725
~~~~~~~~~~~~~~~~~~~~~

docs/it/example/publiccode.minimal.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ developmentStatus: development
1515
softwareType: "standalone"
1616

1717
description:
18-
eng:
18+
en:
1919
localisedName: medusa # Optional
2020
genericName: Text Editor
2121
shortDescription: >
@@ -43,4 +43,4 @@ maintenance:
4343
localisation:
4444
localisationReady: yes
4545
availableLanguages:
46-
- eng
46+
- en

docs/it/example/publiccode.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ intendedAudience:
4747
- us
4848

4949
description:
50-
eng:
50+
en:
5151
localisedName: Medusa
5252
genericName: Text Editor
5353
shortDescription: >
@@ -104,10 +104,10 @@ maintenance:
104104
localisation:
105105
localisationReady: yes
106106
availableLanguages:
107-
- eng
108-
- ita
109-
- fra
110-
- deu
107+
- en
108+
- it
109+
- fr
110+
- de
111111

112112
dependsOn:
113113
open:

docs/it/schema.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,16 +359,17 @@ descriva il software.
359359
**Nota bene:** siccome tutte le stringhe contenute in questa sezione sono
360360
visibili all’utente e scritte in un linguaggio specifico, è
361361
**necessario** specificare il linguaggio con il quale si sta modificando
362-
il testo (usando i codici `ISO
363-
639-2 <https://en.wikipedia.org/wiki/ISO_639-2>`__ alpha-3) creando una
364-
sezione con quel nome.
362+
il testo. Per farlo è necessario creare una sezione dedicata alla lingua
363+
seguendo le specifiche IETF `BCP 47 <https://tools.ietf.org/html/bcp47>`__. Si
364+
ricorda che il *primary language
365+
subtag* non può essere omesso, come specificato nel BCP 47.
365366

366367
Un esempio per l’italiano:
367368

368369
.. code:: .yaml
369370

370371
description:
371-
ita:
372+
it:
372373
shortDescription: ...
373374
longDescription: ...
374375

@@ -721,12 +722,14 @@ disponibili si veda la chiave ``localisation/availableLanguages``.
721722
Chiave ``localisation/availableLanguages``
722723
''''''''''''''''''''''''''''''''''''''''''
723724

724-
- Tipo: lista di codici `ISO
725-
639-2 <https://en.wikipedia.org/wiki/ISO_639-2>`__ alpha-3
725+
- Tipo: lista di *language tag* secondo le specifiche IETF BCP 47
726726
- Presenza: obbligatoria
727+
- Esempio: ``"it"``, ``"en"``, ``"sl-IT-nedis"``
727728

728729
Se presente, questa è la lista di lingue in cui è disponibile il
729730
software. Ovviamente, questa lista dovrà contenere almeno una lingua.
731+
Si ricorda che il *primary language subtag* non può essere omesso, come
732+
specificato dal `BCP 47 <https://tools.ietf.org/html/bcp47>`__.
730733

731734
Sezione ``dependsOn``
732735
~~~~~~~~~~~~~~~~~~~~~

pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
- [ ] Ensure your files are written following RST specs (*not MD!*)
88
- [ ] Italian version
99
- [ ] English version
10+
- [ ] Example files
1011
- [ ] Ask for review

0 commit comments

Comments
 (0)