Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Add Irish translation and tests #298

Merged
54 commits merged into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5afda3e
Create gd.js
Dec 27, 2019
4fd568d
Update gd.js
Dec 27, 2019
2d8d528
Update gd.js
Dec 27, 2019
60649ad
Update gd.js
Dec 27, 2019
6e53b8f
Update gd.js
Dec 27, 2019
39e5f31
Create gd.json test case
Dec 31, 2019
f22703b
Update gd.js
Dec 31, 2019
148a5e0
Corrections in gd.json
Dec 31, 2019
19d1a19
Corrections in gd.js
Dec 31, 2019
57d64ff
Correct title case in gd.json
Dec 31, 2019
8dbbfc4
Corrections in gd.json
Dec 31, 2019
21ce99d
Corrections in gd.js
Dec 31, 2019
893d965
Corrections in gd.json
Dec 31, 2019
5d2dd89
Corrections in gd.js
Dec 31, 2019
000dc10
Corrections in gd.json
Dec 31, 2019
be484ea
Corrections in gd.js
Dec 31, 2019
5c18a14
Corrections in gd.json
Dec 31, 2019
72870b3
Corrections in gd.json
Dec 31, 2019
f3294f9
Update gd.js
Dec 31, 2019
46d1652
Update gd.json
Dec 31, 2019
50b2332
Update gd.js
Dec 31, 2019
f3c566d
Update gd.js
Dec 31, 2019
48cc381
Update gd.js
Dec 31, 2019
9e76199
Update gd.js
Dec 31, 2019
d54482b
Update gd.js
Dec 31, 2019
1dedf0d
Update gd.json
Dec 31, 2019
810ad1e
Update gd.json
Dec 31, 2019
a668b90
Update gd.json
Dec 31, 2019
f4dfd88
Removed extra space
Jan 6, 2020
57b456c
Merge pull request #1 from darkskyapp/master
Jan 18, 2020
a89bdbe
Clean up Scottish Gaelic translation
Jan 18, 2020
f19edc4
Clean up Scottish Gaelic translation
Jan 18, 2020
780c308
Clean up Scottish Gaelic translation
Jan 18, 2020
e7833ef
Add status properties in Scottish Gaelic
Jan 18, 2020
063cc0a
Add status properties in Scottish Gaelic
Jan 18, 2020
00a7ed8
Add status properties in Scottish Gaelic
Jan 18, 2020
317abbe
Add status properties in Scottish Gaelic
Jan 18, 2020
960ec14
Add status properties in Scottish Gaelic
Jan 18, 2020
1400d95
Corrected spacing
Jan 18, 2020
cac893b
Merge pull request #2 from darkskyapp/master
Mar 9, 2020
edfaa3e
Add Irish translation
Mar 10, 2020
61ebf17
Add Irish tests
Mar 10, 2020
9403af7
Correct errors in Irish tests
Mar 10, 2020
9478a3d
Add Irish translation
Mar 10, 2020
2d96d6d
Add Irish tests
Mar 10, 2020
43772bc
Add Irish translation
Mar 10, 2020
08899b8
Add Irish tests
Mar 10, 2020
d9e7b0a
Add Irish translation
Mar 10, 2020
e0ed978
Add Irish tets
Mar 10, 2020
5545b3a
Add Irish tests
Mar 10, 2020
fa44f18
Add Irish translation
Mar 10, 2020
39b9e53
Add Irish translation
Mar 10, 2020
b7c911b
Add Irish translation
Mar 10, 2020
d4c1756
Add Irish translation
Mar 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions lib/lang/ga.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
"use strict";

// function join_with_shared_prefix(a, b, joiner) {
// let i = 0;

// while(i !== a.length &&
// i !== b.length &&
// a.charCodeAt(i) === b.charCodeAt(i))
// ++i;

// while(i && a.charCodeAt(i - 1) !== 32)
// --i;

// return a + joiner + b.slice(i);
// }

module.exports = {
"clear": "glan",
"no-precipitation": "ní bheidh frasaíocht ann",
"mixed-precipitation": "frasaíocht éagsúil",
"possible-very-light-precipitation": "seans ar frasaíocht an-éadrom",
"very-light-precipitation": "frasaíocht an-éadrom",
"possible-light-precipitation": "seans ar frasaíocht éadrom",
"light-precipitation": "frasaíocht éadrom",
"medium-precipitation": "frasaíocht",
"heavy-precipitation": "frasaíocht throm",
"possible-very-light-rain": "seans ar fearthainn an-éadrom",
"very-light-rain": "fearthainn an-éadrom",
"possible-light-rain": "seans ar fearthainn éadrom",
"light-rain": "fearthainn éadrom",
"medium-rain": "fearthainn",
"heavy-rain": "fearthainn throm",
"possible-very-light-sleet": "seans ar flichshneachta an-éadrom",
"very-light-sleet": "flichshneachta an-éadrom",
"possible-light-sleet": "seans ar flichshneachta éadrom",
"light-sleet": "flichshneachta éadrom",
"medium-sleet": "flichshneachta",
"heavy-sleet": "flichshneachta trom",
"possible-very-light-snow": "seans ar sneachta an-éadrom",
"very-light-snow": "sneachta an-éadrom",
"possible-light-snow": "seans ar sneachta éadrom",
"light-snow": "sneachta éadrom",
"medium-snow": "sneachta",
"heavy-snow": "sneachta trom",
"possible-thunderstorm": "seans ar stoirm thoirní",
"thunderstorm": "stoirm thoirní",
"light-wind": "laoithne éadrom",
"medium-wind": "laoithne mheasarth",
"heavy-wind": "laoithne láidir",
"low-humidity": "bogthaise íseal",
"high-humidity": "bogthaise ard",
"fog": "ceoch",
"light-clouds": "scamaill bhána",
"medium-clouds": "scamaill mheasartha",
"heavy-clouds": "scamaill throma",
"today-morning": "maidin inniu",
"later-today-morning": "níos déanaí ar maidin inniu",
"today-afternoon": "iarnóin inniu",
"later-today-afternoon": "níos déanaí ar iarnóin inniu",
"today-evening": "tráthnóna inniu",
"later-today-evening": "níos déanaí ar tráthnóna inniu",
"today-night": "anocht",
"later-today-night": "níos déanaí anocht",
"tomorrow-morning": "maidin amárach",
"tomorrow-afternoon": "iarnóin amárach",
"tomorrow-evening": "tráthnóna amárach",
"tomorrow-night": "oiche amárach",
"morning": "ar maidin",
"afternoon": "iarnóin",
"evening": "tráthnóna",
"night": "anocht",
"today": "inniu",
"tomorrow": "amárach",
"sunday": "Dé Domhnaigh",
"monday": "Dé Luain",
"tuesday": "Dé Máirt",
"wednesday": "Dé Céadaoin",
"thursday": "Déardaoin",
"friday": "Dé hAoine",
"saturday": "Dé Sathairn",
"next-sunday": "Dé Domhnaigh seo chugainn",
"next-monday": "Dé Luain seo chugainn",
"next-tuesday": "Dé Máirt seo chugainn",
"next-wednesday": "Dé Céadaoin seo chugainn",
"next-thursday": "Déardaoin seo chugainn",
"next-friday": "Dé hAoine seo chugainn",
"next-saturday": "Dé Sathairn seo chugainn",
"minutes": "$1 nóim.",
"fahrenheit": "$1\u00B0F",
"celsius": "$1\u00B0C",
"inches": "$1 orl.",
"centimeters": "$1 cm.",
"less-than": "< $1",
"and": "$1 agus $2",
"through": "$1 go dtí $2",
"with": "$1, le $2",
"range": "$1\u2013$2",
"parenthetical": "$1 ($2)",
"for-hour": "$1 ar feadh uair an chloig",
"starting-in": "$1 ag tosú i $2",
"stopping-in": "$1 ag stopadh i $2",
"starting-then-stopping-later": "$1 ag tosú i $2, ag stopadh i $3",
"stopping-then-starting-later": "$1 ag stopadh i $2, ag tosú arís i $3",
"for-day": "$1 ar feadh an lae",
"starting": "$1 ag tosú $2",
"until": "$1 ag stopadh $2",
"until-starting-again": "$1 ag stopadh $2, ag tosú arís $3",
"starting-continuing-until": "$1 ag tosú $2, ag stopadh $3",
"during": "$1 $2",
"for-week": "$1 ar feadh na seachtaine",
"over-weekend": "$1 ar feadh an deireadh seachtaine",
"temperatures-peaking": "an teocht dul chomh hard le $1 $2",
"temperatures-rising": "an teteocht dul chomh hard le $1 $2",
"temperatures-valleying": "an teocht dul chomh íseal le $1 $2",
"temperatures-falling": "an teocht dul chomh íseal le $1 $2",
// Capitalize the first letter of every word, except if that word is
// "and". (This is a very crude bastardization of proper English titling
// rules, but it is adequate for the purposes of this module.)
"title": function(str) {
return str.replace(/\S+/g, function(word) {
return word === "Agus" ?
word :
word.charAt(0).toUpperCase() + word.slice(1);
});
},
/* Capitalize the first word of the sentence and end with a period. */
"sentence": function(str) {
/* Capitalize. */
str = str.charAt(0).toUpperCase() + str.slice(1);

/* Add a period if there isn't already one. */
if(str.charAt(str.length - 1) !== ".")
str += ".";

return str;
},
"next-hour-forecast-status": "níl réamhaisnéise an uair seo chugainn $1 mar go bhfuil $2",
"unavailable": "ar fáil",
"temporarily-unavailable": "ar fáil i láthair na huaire",
"partially-unavailable": "ar fáil go hiomlán",
"station-offline": "gach stáisiún radair atá in aice láimhe as líne",
"station-incomplete": "bearnaí san fhaisnéis ó na stáisiúin radair atá in aice láimhe",
};
252 changes: 252 additions & 0 deletions test_cases/ga.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
{
"Glan":
["title", "clear"],

"Seans Ar Frasaíocht An-éadrom":
["title", "possible-very-light-precipitation"],

"Frasaíocht An-éadrom":
["title", "very-light-precipitation"],

"Seans Ar Frasaíocht Éadrom":
["title", "possible-light-precipitation"],

"Frasaíocht Éadrom":
["title", "light-precipitation"],

"Frasaíocht":
["title", "medium-precipitation"],

"Frasaíocht Throm":
["title", "heavy-precipitation"],

"Seans Ar Fearthainn An-éadrom":
["title", "possible-very-light-rain"],

"Fearthainn An-éadrom":
["title", "very-light-rain"],

"Seans Ar Fearthainn Éadrom":
["title", "possible-light-rain"],

"Fearthainn Éadrom":
["title", "light-rain"],

"Fearthainn":
["title", "medium-rain"],

"Fearthainn Throm":
["title", "heavy-rain"],

"Seans Ar Flichshneachta An-éadrom":
["title", "possible-very-light-sleet"],

"Flichshneachta An-éadrom":
["title", "very-light-sleet"],

"Seans Ar Flichshneachta Éadrom":
["title", "possible-light-sleet"],

"Flichshneachta Éadrom":
["title", "light-sleet"],

"Flichshneachta":
["title", "medium-sleet"],

"Flichshneachta Trom":
["title", "heavy-sleet"],

"Seans Ar Sneachta An-éadrom":
["title", "possible-very-light-snow"],

"Sneachta An-éadrom":
["title", "very-light-snow"],

"Seans Ar Sneachta Éadrom":
["title", "possible-light-snow"],

"Sneachta Éadrom":
["title", "light-snow"],

"Sneachta":
["title", "medium-snow"],

"Sneachta Trom":
["title", "heavy-snow"],

"Laoithne Mheasarth":
["title", "medium-wind"],

"Laoithne Láidir":
["title", "heavy-wind"],

"Ceoch":
["title", "fog"],

"Scamaill Mheasartha":
["title", "medium-clouds"],

"Scamaill Throma":
["title", "heavy-clouds"],

"Bogthaise Íseal Agus Laoithne Éadrom":
["title", ["and", "low-humidity", "light-wind"]],

"Fearthainn An-éadrom Agus Laoithne Láidir":
["title", ["and", "very-light-rain", "heavy-wind"]],

"Bogthaise Ard Agus Scamaill Bhána":
["title", ["and", "high-humidity", "light-clouds"]],

"Glan ar feadh uair an chloig.":
["sentence", ["for-hour", "clear"]],

"Sneachta an-éadrom ag tosú i 35 nóim.":
["sentence", ["starting-in", "very-light-snow", ["minutes", 35]]],

"Fearthainn éadrom ag stopadh i 15 nóim.":
["sentence", ["stopping-in", "light-rain", ["minutes", 15]]],

"Flichshneachta trom ag tosú i 20 nóim., ag stopadh i 30 nóim.":
["sentence",
["starting-then-stopping-later",
"heavy-sleet",
["minutes", 20],
["minutes", 30]]],

"Fearthainn ag stopadh i 25 nóim., ag tosú arís i 8 nóim.":
["sentence",
["stopping-then-starting-later",
"medium-rain",
["minutes", 25],
["minutes", 8]]],

"Scamaill mheasartha ar feadh an lae.":
["sentence", ["for-day", "medium-clouds"]],

"Flichshneachta an-éadrom ag tosú ar maidin.":
["sentence", ["starting", "very-light-sleet", "morning"]],

"Laoithne mheasarth ag stopadh anocht.":
["sentence", ["until", "medium-wind", "today-night"]],

"Frasaíocht throm ag stopadh iarnóin.":
["sentence", ["until", "heavy-precipitation", "afternoon"]],

"Laoithne éadrom iarnóin.":
["sentence", ["during", "light-wind", "afternoon"]],

"Sneachta níos déanaí ar tráthnóna inniu agus maidin amárach.":
["sentence", ["during",
"medium-snow",
["and", "later-today-evening", "tomorrow-morning"]]],

"Fearthainn throm ag stopadh níos déanaí ar maidin inniu, ag tosú arís tráthnóna inniu.":
["sentence", ["until-starting-again",
"heavy-rain",
"later-today-morning",
"today-evening"]],

"Scamaill throma ag tosú tráthnóna, ag stopadh anocht.":
["sentence", ["starting-continuing-until",
"heavy-clouds",
"evening",
"night"]],

"Flichshneachta éadrom níos déanaí ar iarnóin inniu agus ceoch maidin amárach.":
["sentence", ["and",
["during", "light-sleet", "later-today-afternoon"],
["during", "fog", "tomorrow-morning"]]],

"Laoithne láidir ag tosú maidin inniu, ag stopadh iarnóin inniu agus flichshneachta maidin amárach.":
["sentence", ["and",
["starting-continuing-until",
"heavy-wind",
"today-morning",
"today-afternoon"],
["during", "medium-sleet", "tomorrow-morning"]]],

"Scamaill throma ag tosú níos déanaí anocht agus sneachta trom iarnóin amárach.":
["sentence", ["and",
["starting", "heavy-clouds", "later-today-night"],
["during", "heavy-snow", "tomorrow-afternoon"]]],

"Bogthaise íseal anocht agus frasaíocht éadrom ag tosú tráthnóna amárach, ag stopadh oiche amárach.":
["sentence", ["and",
["during", "low-humidity", "today-night"],
["starting-continuing-until",
"light-precipitation",
"tomorrow-evening",
"tomorrow-night"]]],

"Sneachta (5 orl.) anocht.":
["sentence", ["during",
["parenthetical", "medium-snow", ["inches", 5]],
"night"]],

"Sneachta éadrom (2 cm.) níos déanaí ar maidin inniu.":
["sentence", ["during",
["parenthetical", "light-snow", ["centimeters", 2]],
"later-today-morning"]],

"Sneachta trom (8\u201312 orl.) ar feadh an lae.":
["sentence", ["for-day",
["parenthetical", "heavy-snow", ["inches", ["range", 8, 12]]]]],

"Sneachta (< 1 cm.) iarnóin.":
["sentence", ["during",
["parenthetical", "medium-snow", ["less-than", ["centimeters", 1]]],
"afternoon"]],


"Ní bheidh frasaíocht ann ar feadh na seachtaine, le an teocht dul chomh hard le 85\u00B0F amárach.":
["sentence", ["with",
["for-week", "no-precipitation"],
["temperatures-peaking",
["fahrenheit", 85],
"tomorrow"]]],

"Frasaíocht éagsúil ar feadh an deireadh seachtaine, le an teteocht dul chomh hard le 32\u00B0C Déardaoin.":
["sentence", ["with",
["over-weekend", "mixed-precipitation"],
["temperatures-rising",
["celsius", 32],
"thursday"]]],

"Fearthainn an-éadrom Dé Luain, le an teocht dul chomh íseal le 15\u00B0F Dé hAoine.":
["sentence", ["with",
["during", "very-light-rain", "monday"],
["temperatures-valleying",
["fahrenheit", 15],
"friday"]]],

"Sneachta éadrom Dé Máirt agus Dé Céadaoin seo chugainn, le an teocht dul chomh íseal le 0\u00B0C Dé Domhnaigh.":
["sentence", ["with",
["during", "light-snow", ["and", "tuesday", "next-wednesday"]],
["temperatures-falling",
["celsius", 0],
"sunday"]]],

"Frasaíocht inniu go dtí Dé Sathairn, le an teocht dul chomh hard le 100\u00B0F Dé Luain.":
["sentence", ["with",
["during",
"medium-precipitation",
["through", "today", "saturday"]],
["temperatures-peaking",
["fahrenheit", 100],
"monday"]]],

"Seans ar stoirm thoirní Dé Céadaoin seo chugainn agus Déardaoin seo chugainn.":
["sentence", ["during",
"possible-thunderstorm",
["and", "next-wednesday", "next-thursday"]
]],
"Níl réamhaisnéise an uair seo chugainn ar fáil i láthair na huaire mar go bhfuil gach stáisiún radair atá in aice láimhe as líne.":
["sentence", ["next-hour-forecast-status", "temporarily-unavailable", "station-offline"]],

"Níl réamhaisnéise an uair seo chugainn ar fáil go hiomlán mar go bhfuil bearnaí san fhaisnéis ó na stáisiúin radair atá in aice láimhe.":
["sentence", ["next-hour-forecast-status", "partially-unavailable", "station-incomplete"]],

"Níl réamhaisnéise an uair seo chugainn ar fáil mar go bhfuil gach stáisiún radair atá in aice láimhe as líne.":
["sentence", ["next-hour-forecast-status", "unavailable", "station-offline"]]
}