Skip to content

Commit

Permalink
Start on vocabularies.json5 w/ accessProtocol
Browse files Browse the repository at this point in the history
Not yet using this, but now extracting, crowdin-ing, and linguijs-ing
  • Loading branch information
hatton committed Jan 1, 2024
1 parent 9c3bcd2 commit c96e57f
Show file tree
Hide file tree
Showing 19 changed files with 528 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .linguirc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
},
{
"path": "<rootDir>/locale/{locale}/fields",
"include": "wont match anything and thats ok"
"include": "wont match anything when scanning and thats ok because we do our own extraction but we need compilation"
},
{
"path": "<rootDir>/locale/{locale}/vocabularies",
"include": "wont match anything when scanning and thats ok because we do our own extraction but we need compilation"
}
],
"format": "po",
Expand Down
18 changes: 18 additions & 0 deletions configurations/ELAR/vocabularies.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
accessProtocol: [
{
key: "O",
label: "O: fully open"
},
{
key: "U",
label: "U: open to users",
description: "All users can access (requires registration)"
},
{
key: "S",
label: "S: open to subscribers",
description: "Only Subscribers are allowed access (must apply to Depositor for access)"
}
]
}
19 changes: 19 additions & 0 deletions configurations/REAP/vocabularies.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
accessProtocol: [
{
key: "Public",
label: "Public",
description: "Open to all users"
},
{
key: "REAP",
label: "REAP Users",
description: "Restricted to REAP users"
},
{
key: "Entity",
label: "Entity",
description: "Restricted to Organizational Unit"
}
]
}
3 changes: 2 additions & 1 deletion configurations/extractFromJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function harvestMessagesFromFile(
}
} else if (
[
"label",
"englishLabel",
"description",
"separatorWithCommaInstructions",
Expand Down Expand Up @@ -72,7 +73,7 @@ function extractAllToJsForLingui() {
}
*/
export function createAllPoFilesFromJsons() {
const sets = ["fields" /* "vocabularies" */];
const sets = ["fields", "vocabularies"];
for (const set of sets) {
createPoFilesFromOneSetOfJsons(set);
}
Expand Down
3 changes: 2 additions & 1 deletion configurations/lameta/fields.json5
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
key: "accessProtocol",
form: "accessProtocol",
tagInSayMoreClassic: "AccessProtocol",
englishLabel: "Access Protocol used by this project"
englishLabel: "Access Protocol used by this project",
vocabulary: "accessProtocol"
},
{
key: "customAccessChoices",
Expand Down
4 changes: 4 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ files: [
"translation": /%two_letters_code%/messages.po,
},
{ "source": /en/fields.po, "translation": /%two_letters_code%/fields.po },
{
"source": /en/vocabularies.po,
"translation": /%two_letters_code%/vocabularies.po,
},
{
"source": /accessProtocols.csv,
"translation": /%original_file_name%,
Expand Down
43 changes: 43 additions & 0 deletions locale/en/vocabularies.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
msgctxt "ELAR/accessProtocol/O/label"
msgid "O: fully open"
msgstr ""

msgctxt "ELAR/accessProtocol/S/description"
msgid "Only Subscribers are allowed access (must apply to Depositor for access)"
msgstr ""

msgctxt "ELAR/accessProtocol/S/label"
msgid "S: open to subscribers"
msgstr ""

msgctxt "ELAR/accessProtocol/U/description"
msgid "All users can access (requires registration)"
msgstr ""

msgctxt "ELAR/accessProtocol/U/label"
msgid "U: open to users"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/description"
msgid "Restricted to Organizational Unit"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/label"
msgid "Entity"
msgstr ""

msgctxt "REAP/accessProtocol/Public/description"
msgid "Open to all users"
msgstr ""

msgctxt "REAP/accessProtocol/Public/label"
msgid "Public"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/description"
msgid "Restricted to REAP users"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/label"
msgid "REAP Users"
msgstr ""
58 changes: 58 additions & 0 deletions locale/es/vocabularies.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
msgid ""
msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: saymorex\n"
"X-Crowdin-Project-ID: 324607\n"
"X-Crowdin-Language: es-ES\n"
"X-Crowdin-File: /V3/vocabularies.po\n"
"X-Crowdin-File-ID: 84\n"
"Project-Id-Version: saymorex\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Spanish\n"
"Language: es_ES\n"
"PO-Revision-Date: 2024-01-01 23:15\n"

msgctxt "ELAR/accessProtocol/O/label"
msgid "O: fully open"
msgstr ""

msgctxt "ELAR/accessProtocol/S/description"
msgid "Only Subscribers are allowed access (must apply to Depositor for access)"
msgstr ""

msgctxt "ELAR/accessProtocol/S/label"
msgid "S: open to subscribers"
msgstr ""

msgctxt "ELAR/accessProtocol/U/description"
msgid "All users can access (requires registration)"
msgstr ""

msgctxt "ELAR/accessProtocol/U/label"
msgid "U: open to users"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/description"
msgid "Restricted to Organizational Unit"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/label"
msgid "Entity"
msgstr ""

msgctxt "REAP/accessProtocol/Public/description"
msgid "Open to all users"
msgstr ""

msgctxt "REAP/accessProtocol/Public/label"
msgid "Public"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/description"
msgid "Restricted to REAP users"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/label"
msgid "REAP Users"
msgstr ""

58 changes: 58 additions & 0 deletions locale/fa/vocabularies.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
msgid ""
msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: saymorex\n"
"X-Crowdin-Project-ID: 324607\n"
"X-Crowdin-Language: fa\n"
"X-Crowdin-File: /V3/vocabularies.po\n"
"X-Crowdin-File-ID: 84\n"
"Project-Id-Version: saymorex\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Persian\n"
"Language: fa_IR\n"
"PO-Revision-Date: 2024-01-01 23:15\n"

msgctxt "ELAR/accessProtocol/O/label"
msgid "O: fully open"
msgstr ""

msgctxt "ELAR/accessProtocol/S/description"
msgid "Only Subscribers are allowed access (must apply to Depositor for access)"
msgstr ""

msgctxt "ELAR/accessProtocol/S/label"
msgid "S: open to subscribers"
msgstr ""

msgctxt "ELAR/accessProtocol/U/description"
msgid "All users can access (requires registration)"
msgstr ""

msgctxt "ELAR/accessProtocol/U/label"
msgid "U: open to users"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/description"
msgid "Restricted to Organizational Unit"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/label"
msgid "Entity"
msgstr ""

msgctxt "REAP/accessProtocol/Public/description"
msgid "Open to all users"
msgstr ""

msgctxt "REAP/accessProtocol/Public/label"
msgid "Public"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/description"
msgid "Restricted to REAP users"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/label"
msgid "REAP Users"
msgstr ""

58 changes: 58 additions & 0 deletions locale/fr/vocabularies.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
msgid ""
msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Crowdin-Project: saymorex\n"
"X-Crowdin-Project-ID: 324607\n"
"X-Crowdin-Language: fr\n"
"X-Crowdin-File: /V3/vocabularies.po\n"
"X-Crowdin-File-ID: 84\n"
"Project-Id-Version: saymorex\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: French\n"
"Language: fr_FR\n"
"PO-Revision-Date: 2024-01-01 23:15\n"

msgctxt "ELAR/accessProtocol/O/label"
msgid "O: fully open"
msgstr ""

msgctxt "ELAR/accessProtocol/S/description"
msgid "Only Subscribers are allowed access (must apply to Depositor for access)"
msgstr ""

msgctxt "ELAR/accessProtocol/S/label"
msgid "S: open to subscribers"
msgstr ""

msgctxt "ELAR/accessProtocol/U/description"
msgid "All users can access (requires registration)"
msgstr ""

msgctxt "ELAR/accessProtocol/U/label"
msgid "U: open to users"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/description"
msgid "Restricted to Organizational Unit"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/label"
msgid "Entity"
msgstr ""

msgctxt "REAP/accessProtocol/Public/description"
msgid "Open to all users"
msgstr ""

msgctxt "REAP/accessProtocol/Public/label"
msgid "Public"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/description"
msgid "Restricted to REAP users"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/label"
msgid "REAP Users"
msgstr ""

58 changes: 58 additions & 0 deletions locale/id/vocabularies.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
msgid ""
msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Crowdin-Project: saymorex\n"
"X-Crowdin-Project-ID: 324607\n"
"X-Crowdin-Language: id\n"
"X-Crowdin-File: /V3/vocabularies.po\n"
"X-Crowdin-File-ID: 84\n"
"Project-Id-Version: saymorex\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Indonesian\n"
"Language: id_ID\n"
"PO-Revision-Date: 2024-01-01 23:15\n"

msgctxt "ELAR/accessProtocol/O/label"
msgid "O: fully open"
msgstr ""

msgctxt "ELAR/accessProtocol/S/description"
msgid "Only Subscribers are allowed access (must apply to Depositor for access)"
msgstr ""

msgctxt "ELAR/accessProtocol/S/label"
msgid "S: open to subscribers"
msgstr ""

msgctxt "ELAR/accessProtocol/U/description"
msgid "All users can access (requires registration)"
msgstr ""

msgctxt "ELAR/accessProtocol/U/label"
msgid "U: open to users"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/description"
msgid "Restricted to Organizational Unit"
msgstr ""

msgctxt "REAP/accessProtocol/Entity/label"
msgid "Entity"
msgstr ""

msgctxt "REAP/accessProtocol/Public/description"
msgid "Open to all users"
msgstr ""

msgctxt "REAP/accessProtocol/Public/label"
msgid "Public"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/description"
msgid "Restricted to REAP users"
msgstr ""

msgctxt "REAP/accessProtocol/REAP/label"
msgid "REAP Users"
msgstr ""

8 changes: 8 additions & 0 deletions locale/ps/vocabularies.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2024-01-01 16:14-0700\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: @lingui/cli\n"
"Language: ps\n"
8 changes: 8 additions & 0 deletions locale/pt-BR/vocabularies.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2024-01-01 16:14-0700\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: @lingui/cli\n"
"Language: pt-BR\n"
Loading

0 comments on commit c96e57f

Please sign in to comment.