Skip to content

Commit

Permalink
feat: northern sámi locale, partial translation
Browse files Browse the repository at this point in the history
feat: northern sámi locale, first pass from translator

chore: add todo

chore: qa completed

feat: updated se translations

test: update snapshot before match qa

fix: lowercase

feat: initial se matchers

refactor: shorten se parse patterns

chore: remove todo
  • Loading branch information
audunru committed Mar 4, 2024
1 parent 87016c1 commit df94068
Show file tree
Hide file tree
Showing 9 changed files with 671 additions and 661 deletions.
10 changes: 10 additions & 0 deletions package.json
Expand Up @@ -5828,6 +5828,16 @@
"default": "./locale/ru.mjs"
}
},
"./locale/se": {
"require": {
"types": "./locale/se.d.ts",
"default": "./locale/se.js"
},
"import": {
"types": "./locale/se.d.mts",
"default": "./locale/se.mjs"
}
},
"./locale/sk": {
"require": {
"types": "./locale/sk.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/locale/index.ts
Expand Up @@ -75,6 +75,7 @@ export * from "./pt/index.js";
export * from "./pt-BR/index.js";
export * from "./ro/index.js";
export * from "./ru/index.js";
export * from "./se/index.js";
export * from "./sk/index.js";
export * from "./sl/index.js";
export * from "./sq/index.js";
Expand Down
66 changes: 33 additions & 33 deletions src/locale/se/_lib/formatDistance/index.ts
Expand Up @@ -9,80 +9,80 @@ type FormatDistanceTokenValue =

const formatDistanceLocale: FormatDistanceLocale<FormatDistanceTokenValue> = {
lessThanXSeconds: {
one: "mindre enn ett sekund",
other: "mindre enn {{count}} sekunder",
one: "unnit go ovtta sekundda",
other: "unnit go {{count}} sekundda",
},

xSeconds: {
one: "ett sekund",
other: "{{count}} sekunder",
one: "sekundda",
other: "{{count}} sekundda",
},

halfAMinute: "et halvt minutt",
halfAMinute: "bealle minuhta",

lessThanXMinutes: {
one: "mindre enn ett minutt",
other: "mindre enn {{count}} minutter",
one: "unnit go bealle minuhta",
other: "unnit go {{count}} minuhta",
},

xMinutes: {
one: "ett minutt",
other: "{{count}} minutter",
one: "minuhta",
other: "{{count}} minuhta",
},

aboutXHours: {
one: "omtrent en time",
other: "omtrent {{count}} timer",
one: "sullii ovtta diimmu",
other: "sullii {{count}} diimmu",
},

xHours: {
one: "en time",
other: "{{count}} timer",
one: "diimmu",
other: "{{count}} diimmu",
},

xDays: {
one: "en dag",
other: "{{count}} dager",
one: "beaivvi",
other: "{{count}} beaivvi",
},

aboutXWeeks: {
one: "omtrent en uke",
other: "omtrent {{count}} uker",
one: "sullii ovtta vahku",
other: "sullii {{count}} vahku",
},

xWeeks: {
one: "en uke",
other: "{{count}} uker",
one: "vahku",
other: "{{count}} vahku",
},

aboutXMonths: {
one: "omtrent en måned",
other: "omtrent {{count}} måneder",
one: "sullii ovtta mánu",
other: "sullii {{count}} mánu",
},

xMonths: {
one: "en måned",
other: "{{count}} måneder",
one: "mánu",
other: "{{count}} mánu",
},

aboutXYears: {
one: "omtrent ett år",
other: "omtrent {{count}} år",
one: "sullii ovtta jagi",
other: "sullii {{count}} jagi",
},

xYears: {
one: "ett år",
other: "{{count}} år",
one: "jagi",
other: "{{count}} jagi",
},

overXYears: {
one: "over ett år",
other: "over {{count}} år",
one: "guhkit go jagi",
other: "guhkit go {{count}} jagi",
},

almostXYears: {
one: "nesten ett år",
other: "nesten {{count}} år",
one: "measta jagi",
other: "measta {{count}} jagi",
},
};

Expand All @@ -100,9 +100,9 @@ export const formatDistance: FormatDistanceFn = (token, count, options) => {

if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "om " + result;
return "geahčen " + result;
} else {
return result + " siden";
return result + " áigi";
}
}

Expand Down
12 changes: 6 additions & 6 deletions src/locale/se/_lib/formatLong/index.ts
Expand Up @@ -2,22 +2,22 @@ import type { FormatLong } from "../../../types.js";
import { buildFormatLongFn } from "../../../_lib/buildFormatLongFn/index.js";

const dateFormats = {
full: "EEEE d. MMMM y",
long: "d. MMMM y",
medium: "d. MMM y",
full: "EEEE MMMM d. 'b.' y",
long: "MMMM d. 'b.' y",
medium: "MMM d. 'b.' y",
short: "dd.MM.y",
};

const timeFormats = {
full: "'kl'. HH:mm:ss zzzz",
full: "'dii.' HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};

const dateTimeFormats = {
full: "{{date}} 'kl.' {{time}}",
long: "{{date}} 'kl.' {{time}}",
full: "{{date}} 'dii.' {{time}}",
long: "{{date}} 'dii.' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
Expand Down
10 changes: 5 additions & 5 deletions src/locale/se/_lib/formatRelative/index.ts
@@ -1,11 +1,11 @@
import type { FormatRelativeFn } from "../../../types.js";

const formatRelativeLocale = {
lastWeek: "'forrige' eeee 'kl.' p",
yesterday: "'i går kl.' p",
today: "'i dag kl.' p",
tomorrow: "'i morgen kl.' p",
nextWeek: "EEEE 'kl.' p",
lastWeek: "'ovddit' eeee 'dii.' p",
yesterday: "'ikte dii.' p",
today: "'odne dii.' p",
tomorrow: "'ihtin dii.' p",
nextWeek: "EEEE 'dii.' p",
other: "P",
};

Expand Down
114 changes: 57 additions & 57 deletions src/locale/se/_lib/localize/index.ts
Expand Up @@ -2,94 +2,94 @@ import type { Localize, LocalizeFn } from "../../../types.js";
import { buildLocalizeFn } from "../../../_lib/buildLocalizeFn/index.js";

const eraValues = {
narrow: ["f.Kr.", "e.Kr."] as const,
abbreviated: ["f.Kr.", "e.Kr."] as const,
wide: ["før Kristus", "etter Kristus"] as const,
narrow: ["o.Kr.", "m.Kr."] as const,
abbreviated: ["o.Kr.", "m.Kr."] as const,
wide: ["ovdal Kristusa", "maŋŋel Kristusa"] as const,
};

const quarterValues = {
narrow: ["1", "2", "3", "4"] as const,
abbreviated: ["Q1", "Q2", "Q3", "Q4"] as const,
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"] as const,
wide: ["1. kvartála", "2. kvartála", "3. kvartála", "4. kvartála"] as const,
};

const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"] as const,
narrow: ["O", "G", "N", "C", "M", "G", "S", "B", "Č", "G", "S", "J"] as const,
abbreviated: [
"jan.",
"feb.",
"mars",
"apr.",
"mai",
"juni",
"juli",
"aug.",
"sep.",
"okt.",
"nov.",
"des.",
"ođđa",
"guov",
"njuk",
"cuo",
"mies",
"geas",
"suoi",
"borg",
"čakč",
"golg",
"skáb",
"juov",
] as const,
wide: [
"januar",
"februar",
"mars",
"april",
"mai",
"juni",
"juli",
"august",
"september",
"oktober",
"november",
"desember",
"ođđajagemánnu",
"guovvamánnu",
"njukčamánnu",
"cuoŋománnu",
"miessemánnu",
"geassemánnu",
"suoidnemánnu",
"borgemánnu",
"čakčamánnu",
"golggotmánnu",
"skábmamánnu",
"juovlamánnu",
] as const,
};

const dayValues = {
narrow: ["S", "M", "T", "O", "T", "F", "L"] as const,
short: ["", "ma", "ti", "on", "to", "fr", ""] as const,
abbreviated: ["søn", "man", "tir", "ons", "tor", "fre", "lør"] as const,
narrow: ["S", "V", "M", "G", "D", "B", "L"] as const,
short: ["sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"] as const,
abbreviated: ["sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"] as const,
wide: [
"søndag",
"mandag",
"tirsdag",
"onsdag",
"torsdag",
"fredag",
"lørdag",
"sotnabeaivi",
"vuossárga",
"maŋŋebárga",
"gaskavahkku",
"duorastat",
"bearjadat",
"lávvardat",
] as const,
};

const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "midnatt",
noon: "middag",
morning: "på morg.",
afternoon: "på etterm.",
evening: "på kvelden",
night: "på natten",
midnight: "gaskaidja",
noon: "gaskabeaivi",
morning: "iđđes",
afternoon: "maŋŋel gaska.",
evening: "eahkes",
night: "ihkku",
},
abbreviated: {
am: "a.m.",
pm: "p.m.",
midnight: "midnatt",
noon: "middag",
morning: "på morg.",
afternoon: "på etterm.",
evening: "på kvelden",
night: "på natten",
midnight: "gaskaidja",
noon: "gaskabeaivvi",
morning: "iđđes",
afternoon: "maŋŋel gaskabea.",
evening: "eahkes",
night: "ihkku",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "midnatt",
noon: "middag",
morning: "på morgenen",
afternoon: "på ettermiddagen",
evening: "på kvelden",
night: "på natten",
midnight: "gaskaidja",
noon: "gaskabeavvi",
morning: "iđđes",
afternoon: "maŋŋel gaskabeaivvi",
evening: "eahkes",
night: "ihkku",
},
};

Expand Down

0 comments on commit df94068

Please sign in to comment.