Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
743508a
Uniform ita index.yml and add some little corrections
damjang Oct 12, 2022
5625973
First try to add Slovenian localization
damjang Oct 12, 2022
ae0e932
First try to add Slovenian localization
damjang Oct 12, 2022
1a11a40
First try to add Slovenian localization
damjang Oct 12, 2022
6d16516
Update authentication_landing.md
damjang Oct 14, 2022
358ebb4
Merge branch 'master' into master
dmnplb Jan 13, 2023
624529f
Merge branch 'master' into master
dmnplb Feb 3, 2023
bf20513
Merge branch 'master' into master
Vangaorth Feb 17, 2023
647890e
Partial fixes to add full support to the slovenian language
Vangaorth Feb 17, 2023
55a7413
Merge remote-tracking branch 'origin/master' into IOPLT-1499-convert-…
dmnplb Dec 16, 2025
6084924
chore(i18n): import sl locale and generator changes from contributor …
dmnplb Dec 16, 2025
b36b32e
Convert `sl` YAML to JSON
dmnplb Dec 16, 2025
b1bb491
Restore `make-locales.ts` from `master`
dmnplb Dec 16, 2025
cf259e5
Update `sl` JSON
dmnplb Dec 16, 2025
12ed37f
Update `sl` JSON
dmnplb Dec 16, 2025
e955955
Update `sl` JSON
dmnplb Dec 16, 2025
4cb1f3f
Update `sl` JSON
dmnplb Dec 16, 2025
01be63a
Update `sl` JSON
dmnplb Dec 16, 2025
a62fca7
Exclude `sl` from official supported locales
dmnplb Dec 16, 2025
8641e84
Remove `md` files because unsupported
dmnplb Dec 16, 2025
d165bf6
Prettify
dmnplb Dec 16, 2025
e3e7619
Update snapshot
dmnplb Dec 16, 2025
d647ec6
Merge branch 'master' into IOPLT-1499-convert-slovenian-locale
dmnplb Dec 16, 2025
0fb0a86
Merge branch 'master' into IOPLT-1499-convert-slovenian-locale
dmnplb Dec 17, 2025
3ee8aae
Merge branch 'master' into IOPLT-1499-convert-slovenian-locale
dmnplb Dec 17, 2025
b4979a9
Merge branch 'master' into IOPLT-1499-convert-slovenian-locale
dmnplb Dec 17, 2025
27d50e0
Merge branch 'master' into IOPLT-1499-convert-slovenian-locale
dmnplb Jan 9, 2026
1fe76c0
Merge branch 'master' into IOPLT-1499-convert-slovenian-locale
dmnplb Jan 13, 2026
74fe2b3
Merge branch 'master' into IOPLT-1499-convert-slovenian-locale
dmnplb Jan 13, 2026
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
3 changes: 2 additions & 1 deletion locales/it/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@
"locales": {
"it": "Italiano",
"en": "Inglese",
"de": "Tedesco"
"de": "Tedesco",
"sl": "Sloveno"
},
"clipboard": {
"copyIntoClipboard": "copia negli appunti",
Expand Down
2,530 changes: 2,530 additions & 0 deletions locales/sl/index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/make-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface LocaleDocWithCheckedKeys extends LocaleDocWithKeys {

const root = path.join(__dirname, "../locales");
// these locales can contains a subset of keys defined in "it" locales where all translations strings are required
const partialLocales = new Set<string>(["en", "de"]);
const partialLocales = new Set<string>(["en", "de", "sl"]);

/**
* Reads a locale document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,222 @@ exports[`LanguagesPreferencesScreen UI Rendering renders the screen with, title,
</View>
</View>
</View>
<View
style={
{
"backgroundColor": "#D2D6E3",
"height": 0.5,
}
}
/>
<View
accessibilityRole="radio"
accessibilityState={
{
"busy": undefined,
"checked": false,
"disabled": false,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={true}
collapsable={false}
focusable={true}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
onTouchEnd={[Function]}
testID="RadioItemTestID_sl"
>
<View
needsOffscreenAlphaCompositing={true}
style={
[
{
"marginHorizontal": -24,
"paddingHorizontal": 24,
"paddingVertical": 12,
},
{
"backgroundColor": undefined,
},
{
"opacity": 1,
},
]
}
>
<View
style={
{
"transform": [
{
"scale": undefined,
},
],
}
}
>
<View
style={
{
"alignItems": "flex-start",
"flexDirection": "row",
"justifyContent": "space-between",
}
}
>
<View
style={
{
"columnGap": 18,
"flexDirection": "row",
"flexShrink": 1,
}
}
>
<Text
allowFontScaling={true}
dynamicTypeRamp="headline"
maxFontSizeMultiplier={1.5}
style={
[
{},
{
"color": "#0E0F13",
"fontFamily": "Titillio",
"fontSize": 16,
"fontStyle": "normal",
"fontWeight": "600",
"lineHeight": 24,
},
{
"flexShrink": 1,
},
]
}
>
Sloveno
</Text>
</View>
<View
style={
{
"width": 8,
}
}
/>
<View
accessibilityElementsHidden={true}
importantForAccessibility="no-hide-descendants"
pointerEvents="none"
>
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={false}
collapsable={false}
focusable={true}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
{
"height": 36,
"width": 36,
}
}
testID="AnimatedRadioInput"
>
<View
style={
[
{
"borderWidth": 2,
"left": 0,
"position": "absolute",
"top": 0,
},
{
"borderRadius": 18,
"height": 36,
"width": 36,
},
{
"borderColor": "#636B82",
},
]
}
/>
<View
style={
[
{
"left": 0,
"position": "absolute",
"top": 0,
},
{
"borderRadius": 18,
"height": 36,
"width": 36,
},
{
"backgroundColor": "#0B3EE3",
},
{
"opacity": 0,
"transform": [
{
"scale": undefined,
},
],
},
]
}
/>
</View>
</View>
</View>
</View>
</View>
</View>
<View
style={
{
Expand Down
6 changes: 5 additions & 1 deletion ts/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Locales } from "../locales/locales";
import it from "../locales/it/index.json";
import en from "../locales/en/index.json";
import de from "../locales/de/index.json";
import sl from "../locales/sl/index.json";
import { PreferredLanguageEnum } from "../definitions/session_manager/PreferredLanguage";

const resources = {
Expand All @@ -18,6 +19,9 @@ const resources = {
},
de: {
index: de
},
sl: {
index: sl
}
};

Expand All @@ -29,7 +33,7 @@ type FallBackLocale = {
};

export const localeToLocalizedMessageKey = new Map<
Locales,
Exclude<Locales, "sl">,
LocalizedMessageKeys
>([
["it", "it-IT"],
Expand Down
8 changes: 7 additions & 1 deletion ts/utils/dates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { format as dateFnsFormat } from "date-fns";
import dfns_de from "date-fns/locale/de";
import dfns_en from "date-fns/locale/en";
import dfns_it from "date-fns/locale/it";
import dfns_sl from "date-fns/locale/sl";
import * as E from "fp-ts/lib/Either";
import { pipe } from "fp-ts/lib/function";
import * as O from "fp-ts/lib/Option";
Expand All @@ -17,7 +18,12 @@ type DateFnsLocale = typeof import("date-fns/locale/it");

type DFNSLocales = Record<Locales, DateFnsLocale>;

const locales: DFNSLocales = { it: dfns_it, en: dfns_en, de: dfns_de };
const locales: DFNSLocales = {
it: dfns_it,
en: dfns_en,
de: dfns_de,
sl: dfns_sl
};

export const pad = (n: number) => n.toString().padStart(2, "0");

Expand Down
7 changes: 5 additions & 2 deletions ts/utils/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
LocalizedMessageKeys
} from "../i18n";
import { LanguageEnum } from "../../definitions/pagopa/ecommerce/RequestAuthorizationRequest";

type LocaleSubset = Exclude<Locales, "sl">;
/**
* Helpers for handling locales
*/
Expand All @@ -21,7 +23,7 @@ import { LanguageEnum } from "../../definitions/pagopa/ecommerce/RequestAuthoriz
* If not italian, for all other languages italian is the default.
*/
export const getFullLocale = (): LocalizedMessageKeys =>
localeToLocalizedMessageKey.get(I18n.language as Locales) ??
localeToLocalizedMessageKey.get(I18n.language as LocaleSubset) ??
localeFallback.localizedMessageKey;
/**
* Returns the primary component of a locale
Expand All @@ -40,7 +42,8 @@ export function getLocalePrimary(
}

// return the current locale set in the device (this could be different from the app supported languages)
export const getCurrentLocale = (): Locales => I18n.language as Locales;
export const getCurrentLocale = (): LocaleSubset =>
I18n.language as LocaleSubset;

/**
* return the primary component of the current locale (i.e: it-US -> it)
Expand Down
Loading