Skip to content

Commit c5ebcaa

Browse files
Merge pull request #230 from anna-protsyk-cigen/feature/i18n/add-nordic-locales
Add Danish, Finnish, Norwegian and Swedish locale support.
2 parents 354454b + 7b681d5 commit c5ebcaa

7 files changed

Lines changed: 226 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ type File = {
116116
| `height` | string \| number | The height of the component `default: 600px`. Can be a string (e.g., `'100%'`, `'10rem'`) or a number (in pixels). |
117117
| `initialPath` | string | The path of the directory to be loaded initially e.g. `/Documents`. This should be the path of a folder which is included in `files` array. Default value is `""` |
118118
| `isLoading` | boolean | A boolean state indicating whether the application is currently performing an operation, such as creating, renaming, or deleting a file/folder. Displays a loading state if set `true`. |
119-
| `language` | string | A language code used for translations (e.g., `"en-US"`, `"fr-FR"`, `"tr-TR"`). Defaults to `"en-US"` for English. Allows the user to set the desired translation language manually. <br><br>**Available languages:** <br> 🇸🇦 `ar-SA` (Arabic, Saudi Arabia) <br> 🇩🇪 `de-DE` (German, Germany) <br> 🇺🇸 `en-US` (English, United States) <br> 🇪🇸 `es-ES` (Spanish, Spain) <br> 🇮🇷 `fa-IR` (Persian, Iran) <br> 🇫🇷 `fr-FR` (French, France) <br> 🇮🇱 `he-IL` (Hebrew, Israel) <br> 🇮🇳 `hi-IN` (Hindi, India) <br> 🇮🇹 `it-IT` (Italian, Italy) <br> 🇯🇵 `ja-JP` (Japanese, Japan) <br> 🇰🇷 `ko-KR` (Korean, South Korea) <br> 🇧🇷 `pt-BR` (Portuguese, Brazil) <br> 🇵🇹 `pt-PT` (Portuguese, Portugal) <br> 🇷🇺 `ru-RU` (Russian, Russia) <br> 🇹🇷 `tr-TR` (Turkish, Turkey) <br> 🇺🇦 `uk-UA` (Ukrainian, Ukraine) <br> 🇵🇰 `ur-UR` (Urdu, Pakistan) <br> 🇻🇳 `vi-VN` (Vietnamese, Vietnam) <br> 🇨🇳 `zh-CN` (Chinese, Simplified) <br> 🇵🇱 `pl-PL` (Polish, Poland) |
119+
| `language` | string | A language code used for translations (e.g., `"en-US"`, `"fr-FR"`, `"tr-TR"`). Defaults to `"en-US"` for English. Allows the user to set the desired translation language manually. <br><br>**Available languages:** <br> 🇸🇦 `ar-SA` (Arabic, Saudi Arabia) <br> 🇩🇰 `da-DK` (Danish, Denmark) <br> 🇩🇪 `de-DE` (German, Germany) <br> 🇺🇸 `en-US` (English, United States) <br> 🇪🇸 `es-ES` (Spanish, Spain) <br> 🇮🇷 `fa-IR` (Persian, Iran) <br> 🇫🇮 `fi-FI` (Finnish, Finland) <br> 🇫🇷 `fr-FR` (French, France) <br> 🇮🇱 `he-IL` (Hebrew, Israel) <br> 🇮🇳 `hi-IN` (Hindi, India) <br> 🇮🇹 `it-IT` (Italian, Italy) <br> 🇯🇵 `ja-JP` (Japanese, Japan) <br> 🇰🇷 `ko-KR` (Korean, South Korea) <br> 🇳🇴 `nb-NO` (Norwegian, Norway) <br> 🇧🇷 `pt-BR` (Portuguese, Brazil) <br> 🇵🇹 `pt-PT` (Portuguese, Portugal) <br> 🇷🇺 `ru-RU` (Russian, Russia) <br> 🇸🇪 `sv-SE` (Swedish, Sweden) <br> 🇹🇷 `tr-TR` (Turkish, Turkey) <br> 🇺🇦 `uk-UA` (Ukrainian, Ukraine) <br> 🇵🇰 `ur-UR` (Urdu, Pakistan) <br> 🇻🇳 `vi-VN` (Vietnamese, Vietnam) <br> 🇨🇳 `zh-CN` (Chinese, Simplified) <br> 🇵🇱 `pl-PL` (Polish, Poland) |
120120
| `layout` | "list" \| "grid" | Specifies the default layout style for the file manager. Can be either "list" or "grid". Default value is "grid". |
121121
| `maxFileSize` | number | For limiting the maximum upload file size in bytes. |
122122
| `onCopy` | (files: Array<[File](#-file-structure)>) => void | (Optional) A callback function triggered when one or more files or folders are copied providing copied files as an argument. Use this function to perform custom actions on copy event. |

frontend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ type File = {
114114
| `height` | string \| number | The height of the component `default: 600px`. Can be a string (e.g., `'100%'`, `'10rem'`) or a number (in pixels). |
115115
| `initialPath` | string | The path of the directory to be loaded initially e.g. `/Documents`. This should be the path of a folder which is included in `files` array. Default value is `""` |
116116
| `isLoading` | boolean | A boolean state indicating whether the application is currently performing an operation, such as creating, renaming, or deleting a file/folder. Displays a loading state if set `true`. |
117-
| `language` | string | A language code used for translations (e.g., `"en-US"`, `"fr-FR"`, `"tr-TR"`). Defaults to `"en-US"` for English. Allows the user to set the desired translation language manually. <br><br>**Available languages:** <br> 🇸🇦 `ar-SA` (Arabic, Saudi Arabia) <br> 🇩🇪 `de-DE` (German, Germany) <br> 🇺🇸 `en-US` (English, United States) <br> 🇪🇸 `es-ES` (Spanish, Spain) <br> 🇮🇷 `fa-IR` (Persian, Iran) <br> 🇫🇷 `fr-FR` (French, France) <br> 🇮🇱 `he-IL` (Hebrew, Israel) <br> 🇮🇳 `hi-IN` (Hindi, India) <br> 🇮🇹 `it-IT` (Italian, Italy) <br> 🇯🇵 `ja-JP` (Japanese, Japan) <br> 🇰🇷 `ko-KR` (Korean, South Korea) <br> 🇧🇷 `pt-BR` (Portuguese, Brazil) <br> 🇵🇹 `pt-PT` (Portuguese, Portugal) <br> 🇷🇺 `ru-RU` (Russian, Russia) <br> 🇹🇷 `tr-TR` (Turkish, Turkey) <br> 🇺🇦 `uk-UA` (Ukrainian, Ukraine) <br> 🇵🇰 `ur-UR` (Urdu, Pakistan) <br> 🇻🇳 `vi-VN` (Vietnamese, Vietnam) <br> 🇨🇳 `zh-CN` (Chinese, Simplified) <br> 🇵🇱 `pl-PL` (Polish, Poland) |
117+
| `language` | string | A language code used for translations (e.g., `"en-US"`, `"fr-FR"`, `"tr-TR"`). Defaults to `"en-US"` for English. Allows the user to set the desired translation language manually. <br><br>**Available languages:** <br> 🇸🇦 `ar-SA` (Arabic, Saudi Arabia) <br> 🇩🇰 `da-DK` (Danish, Denmark) <br> 🇩🇪 `de-DE` (German, Germany) <br> 🇺🇸 `en-US` (English, United States) <br> 🇪🇸 `es-ES` (Spanish, Spain) <br> 🇮🇷 `fa-IR` (Persian, Iran) <br> 🇫🇮 `fi-FI` (Finnish, Finland) <br> 🇫🇷 `fr-FR` (French, France) <br> 🇮🇱 `he-IL` (Hebrew, Israel) <br> 🇮🇳 `hi-IN` (Hindi, India) <br> 🇮🇹 `it-IT` (Italian, Italy) <br> 🇯🇵 `ja-JP` (Japanese, Japan) <br> 🇰🇷 `ko-KR` (Korean, South Korea) <br> 🇳🇴 `nb-NO` (Norwegian, Norway) <br> 🇧🇷 `pt-BR` (Portuguese, Brazil) <br> 🇵🇹 `pt-PT` (Portuguese, Portugal) <br> 🇷🇺 `ru-RU` (Russian, Russia) <br> 🇸🇪 `sv-SE` (Swedish, Sweden) <br> 🇹🇷 `tr-TR` (Turkish, Turkey) <br> 🇺🇦 `uk-UA` (Ukrainian, Ukraine) <br> 🇵🇰 `ur-UR` (Urdu, Pakistan) <br> 🇻🇳 `vi-VN` (Vietnamese, Vietnam) <br> 🇨🇳 `zh-CN` (Chinese, Simplified) <br> 🇵🇱 `pl-PL` (Polish, Poland) |
118118
| `layout` | "list" \| "grid" | Specifies the default layout style for the file manager. Can be either "list" or "grid". Default value is "grid". |
119119
| `maxFileSize` | number | For limiting the maximum upload file size in bytes. |
120120
| `onCopy` | (files: Array<[File](#-file-structure)>) => void | (Optional) A callback function triggered when one or more files or folders are copied providing copied files as an argument. Use this function to perform custom actions on copy event. |

frontend/src/i18n.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
import i18n from "i18next";
22
import arSA from "./locales/ar-SA.json";
3+
import daDK from "./locales/da-DK.json";
34
import deDE from "./locales/de-DE.json";
45
import enUS from "./locales/en-US.json";
56
import esES from "./locales/es-ES.json";
67
import faIR from "./locales/fa-IR.json";
8+
import fiFI from "./locales/fi-FI.json";
79
import frFR from "./locales/fr-FR.json";
810
import heIL from "./locales/he-IL.json";
911
import hiIN from "./locales/hi-IN.json";
1012
import itIT from "./locales/it-IT.json";
1113
import jaJP from "./locales/ja-JP.json";
1214
import koKR from "./locales/ko-KR.json";
15+
import nbNO from "./locales/nb-NO.json";
1316
import ptBR from "./locales/pt-BR.json";
1417
import ptPT from "./locales/pt-PT.json";
1518
import ruRU from "./locales/ru-RU.json";
19+
import svSE from "./locales/sv-SE.json";
1620
import trTR from "./locales/tr-TR.json";
1721
import ukUA from "./locales/uk-UA.json";
1822
import urUR from "./locales/ur-UR.json";
@@ -22,19 +26,23 @@ import plPL from "./locales/pl-PL.json";
2226

2327
const resources = {
2428
"ar-SA": { translation: arSA },
29+
"da-DK": { translation: daDK },
2530
"de-DE": { translation: deDE },
2631
"en-US": { translation: enUS },
2732
"es-ES": { translation: esES },
2833
"fa-IR": { translation: faIR },
34+
"fi-FI": { translation: fiFI },
2935
"fr-FR": { translation: frFR },
3036
"he-IL": { translation: heIL },
3137
"hi-IN": { translation: hiIN },
3238
"it-IT": { translation: itIT },
3339
"ja-JP": { translation: jaJP },
3440
"ko-KR": { translation: koKR },
41+
"nb-NO": { translation: nbNO },
3542
"pt-BR": { translation: ptBR },
3643
"pt-PT": { translation: ptPT },
3744
"ru-RU": { translation: ruRU },
45+
"sv-SE": { translation: svSE },
3846
"tr-TR": { translation: trTR },
3947
"uk-UA": { translation: ukUA },
4048
"ur-UR": { translation: urUR },

frontend/src/locales/da-DK.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"newFolder": "Ny mappe",
3+
"upload": "Upload",
4+
"paste": "Indsæt",
5+
"changeView": "Skift visning",
6+
"refresh": "Opdater",
7+
"cut": "Klip",
8+
"copy": "Kopiér",
9+
"rename": "Omdøb",
10+
"download": "Download",
11+
"delete": "Slet",
12+
"itemSelected": "element valgt",
13+
"itemsSelected": "elementer valgt",
14+
"cancel": "Annuller",
15+
"clearSelection": "Ryd markering",
16+
"completed": "Fuldført",
17+
"fileNameChangeWarning": "Hvis du ændrer en filendelse, kan filen blive ubrugelig. Er du sikker på, at du vil ændre den?",
18+
"no": "Nej",
19+
"yes": "Ja",
20+
"close": "Luk",
21+
"fileTypeNotAllowed": "Filtypen er ikke tilladt.",
22+
"fileAlreadyExist": "Fil findes allerede.",
23+
"maxUploadSize": "Maksimal uploadstørrelse er",
24+
"dragFileToUpload": "Træk filer for at uploade",
25+
"chooseFile": "Vælg fil",
26+
"uploadFail": "Upload mislykkedes.",
27+
"uploading": "Uploader",
28+
"uploaded": "Uploadet",
29+
"remove": "Fjern",
30+
"abortUpload": "Afbryd upload",
31+
"preview": "Forhåndsvisning",
32+
"previewUnavailable": "Beklager! Forhåndsvisning er ikke tilgængelig for denne fil.",
33+
"home": "Hjem",
34+
"showMoreFolder": "Vis flere mapper",
35+
"moveTo": "Flyt til",
36+
"folderEmpty": "Denne mappe er tom.",
37+
"selectAll": "Vælg alle",
38+
"view": "Vis",
39+
"grid": "Gitter",
40+
"list": "Liste",
41+
"open": "Åbn",
42+
"nothingHereYet": "Intet her endnu",
43+
"name": "Navn",
44+
"modified": "Ændret",
45+
"size": "Størrelse",
46+
"deleteItemConfirm": "Er du sikker på, at du vil slette \"{{fileName}}\"?",
47+
"deleteItemsConfirm": "Er du sikker på, at du vil slette disse {{count}} elementer?",
48+
"percentDone": "{{percent}}% færdig",
49+
"canceled": "Annulleret",
50+
"invalidFileName": "Et filnavn må ikke indeholde følgende tegn: \\ / : * ? \" < > |",
51+
"folderExists": "Denne destination indeholder allerede en mappe med navnet \"{{renameFile}}\".",
52+
"collapseNavigationPane": "Skjul navigationsrude",
53+
"expandNavigationPane": "Udvid navigationsrude"
54+
}

frontend/src/locales/fi-FI.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"newFolder": "Uusi kansio",
3+
"upload": "Lataa",
4+
"paste": "Liitä",
5+
"changeView": "Vaihda näkymää",
6+
"refresh": "Päivitä",
7+
"cut": "Leikkaa",
8+
"copy": "Kopioi",
9+
"rename": "Nimeä uudelleen",
10+
"download": "Lataa",
11+
"delete": "Poista",
12+
"itemSelected": "kohde valittu",
13+
"itemsSelected": "kohdetta valittu",
14+
"cancel": "Peruuta",
15+
"clearSelection": "Tyhjennä valinta",
16+
"completed": "Valmis",
17+
"fileNameChangeWarning": "Jos muutat tiedostopäätettä, tiedosto ei ehkä enää toimi. Haluatko varmasti muuttaa sen?",
18+
"no": "Ei",
19+
"yes": "Kyllä",
20+
"close": "Sulje",
21+
"fileTypeNotAllowed": "Tiedostotyyppi ei sallittu.",
22+
"fileAlreadyExist": "Tiedosto on jo olemassa.",
23+
"maxUploadSize": "Suurin sallittu tiedostokoko on",
24+
"dragFileToUpload": "Raahaa tiedostoja ladattavaksi",
25+
"chooseFile": "Valitse tiedosto",
26+
"uploadFail": "Lataus epäonnistui.",
27+
"uploading": "Ladataan",
28+
"uploaded": "Ladattu",
29+
"remove": "Poista",
30+
"abortUpload": "Keskeytä lataus",
31+
"preview": "Esikatsele",
32+
"previewUnavailable": "Valitettavasti esikatselua ei ole saatavilla tälle tiedostolle.",
33+
"home": "Etusivu",
34+
"showMoreFolder": "Näytä lisää kansioita",
35+
"moveTo": "Siirrä kohteeseen",
36+
"folderEmpty": "Tämä kansio on tyhjä.",
37+
"selectAll": "Valitse kaikki",
38+
"view": "Näytä",
39+
"grid": "Ruudukko",
40+
"list": "Lista",
41+
"open": "Avaa",
42+
"nothingHereYet": "Täällä ei ole vielä mitään",
43+
"name": "Nimi",
44+
"modified": "Muokattu",
45+
"size": "Koko",
46+
"deleteItemConfirm": "Haluatko varmasti poistaa tiedoston \"{{fileName}}\"?",
47+
"deleteItemsConfirm": "Haluatko varmasti poistaa nämä {{count}} kohdetta?",
48+
"percentDone": "{{percent}}% valmis",
49+
"canceled": "Peruutettu",
50+
"invalidFileName": "Tiedostonimessä ei voi olla seuraavia merkkejä: \\ / : * ? \" < > |",
51+
"folderExists": "Kohteessa on jo kansio nimeltä \"{{renameFile}}\".",
52+
"collapseNavigationPane": "Pienennä navigointipaneeli",
53+
"expandNavigationPane": "Laajenna navigointipaneeli"
54+
}

0 commit comments

Comments
 (0)