Skip to content

Commit

Permalink
Retire choices.csv
Browse files Browse the repository at this point in the history
Now handled by fields.json5
  • Loading branch information
hatton committed Jan 1, 2024
1 parent e517211 commit 9c3bcd2
Show file tree
Hide file tree
Showing 12 changed files with 1,435 additions and 66 deletions.
27 changes: 11 additions & 16 deletions configurations/extractFromJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,28 @@ function harvestMessagesFromFile(
for (const area of Object.keys(root)) {
for (const field of root[area]) {
for (const prop of Object.keys(field)) {
if (
const parent = path.basename(path.dirname(relativePath));
if (prop === "choices") {
for (const choice of field[prop]) {
const context = `${parent}/${area}/${field.key}/choices`;
++totalString;
currentMessages.push({
context: context,
message: choice
});
}
} else if (
[
"englishLabel",
"description",
"separatorWithCommaInstructions",
"tipOnUsingThisField"
].includes(prop)
) {
// if currentMessages already has this message, add this context to it after a comma
const existingMessage = currentMessages.find(
(m) => m.message === field[prop]
);
const parent = path.basename(path.dirname(relativePath));
const context = `${parent}/${area}/${field.key}/${
prop === "englishLabel" ? "" : prop
}`.replace(/\/$/, "");
++totalString;
/* I repended of this, as obviously "Description" of a project name may not be the same word as "Description" of a person.
if (existingMessage) {
existingMessage.context = `${existingMessage.context}, ${context}`;
} else {
++newStrings;
currentMessages.push({
context: context,
message: field[prop]
});
}*/
currentMessages.push({
context: context,
message: field[prop]
Expand Down
6 changes: 0 additions & 6 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ files: [
"scheme": "identifier,context,source_phrase,es-ES,fr,ru,zh-CN,pt-BR,id,fa",
},
#"key","Context","en","es","fr","ru","zh-CN","pt-BR","id"
{
"source": /choices.csv,
"translation": /%original_file_name%,
"first_line_contains_header": true,
"scheme": "context,source_phrase,es-ES,fr,ru,zh-CN,pt-BR,id,fa",
},
{
"source": /genres.csv,
"translation": /%original_file_name%,
Expand Down
27 changes: 0 additions & 27 deletions locale/choices.csv

This file was deleted.

176 changes: 176 additions & 0 deletions locale/en/fields.po
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ msgctxt "lameta/person/gender"
msgid "Gender"
msgstr ""

msgctxt "lameta/person/gender/choices"
msgid "Unknown"
msgstr ""

msgctxt "lameta/person/gender/choices"
msgid "Male"
msgstr ""

msgctxt "lameta/person/gender/choices"
msgid "Female"
msgstr ""

msgctxt "lameta/person/gender/choices"
msgid "Other"
msgstr ""

msgctxt "lameta/person/howToContact"
msgid "How to Contact"
msgstr ""
Expand Down Expand Up @@ -98,6 +114,46 @@ msgctxt "lameta/project/continent"
msgid "Continent"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "unspecified"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "Africa"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "Asia"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "Australia"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "Europe"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "Americas"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "North-America"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "Middle-America"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "Oceania"
msgstr ""

msgctxt "lameta/project/continent/choices"
msgid "South-America"
msgstr ""

msgctxt "lameta/project/country"
msgid "Country"
msgstr ""
Expand Down Expand Up @@ -186,6 +242,26 @@ msgctxt "lameta/session/involvement"
msgid "Researcher Involvement"
msgstr ""

msgctxt "lameta/session/involvement/choices"
msgid "unspecified"
msgstr ""

msgctxt "lameta/session/involvement/choices"
msgid "//leaving out until Windows SayMore can handle it: unknown"
msgstr ""

msgctxt "lameta/session/involvement/choices"
msgid "elicited"
msgstr ""

msgctxt "lameta/session/involvement/choices"
msgid "non-elicited"
msgstr ""

msgctxt "lameta/session/involvement/choices"
msgid "no-observer"
msgstr ""

msgctxt "lameta/session/keyword"
msgid "Keywords"
msgstr ""
Expand All @@ -210,6 +286,46 @@ msgctxt "lameta/session/locationContinent"
msgid "Continent"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "unspecified"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "Africa"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "Americas"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "Asia"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "Australia"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "Europe"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "North-America"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "Middle-America"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "Oceania"
msgstr ""

msgctxt "lameta/session/locationContinent/choices"
msgid "South-America"
msgstr ""

msgctxt "lameta/session/locationCountry"
msgid "Country"
msgstr ""
Expand All @@ -226,14 +342,74 @@ msgctxt "lameta/session/planningType"
msgid "Planning Type"
msgstr ""

msgctxt "lameta/session/planningType/choices"
msgid "unspecified"
msgstr ""

msgctxt "lameta/session/planningType/choices"
msgid "//leaving out until Windows SayMore can handle it: unknown"
msgstr ""

msgctxt "lameta/session/planningType/choices"
msgid "spontaneous"
msgstr ""

msgctxt "lameta/session/planningType/choices"
msgid "semi-spontaneous"
msgstr ""

msgctxt "lameta/session/planningType/choices"
msgid "planned"
msgstr ""

msgctxt "lameta/session/socialContext"
msgid "Social Context"
msgstr ""

msgctxt "lameta/session/socialContext/choices"
msgid "unspecified"
msgstr ""

msgctxt "lameta/session/socialContext/choices"
msgid "//leaving out until Windows SayMore can handle it: unknown"
msgstr ""

msgctxt "lameta/session/socialContext/choices"
msgid "family"
msgstr ""

msgctxt "lameta/session/socialContext/choices"
msgid "private"
msgstr ""

msgctxt "lameta/session/socialContext/choices"
msgid "public"
msgstr ""

msgctxt "lameta/session/socialContext/choices"
msgid "controlled environment"
msgstr ""

msgctxt "lameta/session/status"
msgid "Status"
msgstr ""

msgctxt "lameta/session/status/choices"
msgid "Incoming"
msgstr ""

msgctxt "lameta/session/status/choices"
msgid "In_Progress"
msgstr ""

msgctxt "lameta/session/status/choices"
msgid "Finished"
msgstr ""

msgctxt "lameta/session/status/choices"
msgid "Skipped"
msgstr ""

msgctxt "lameta/session/subgenre"
msgid "Subgenre"
msgstr ""
Expand Down
Loading

0 comments on commit 9c3bcd2

Please sign in to comment.