Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localisation patch for ltLT #25274

Closed
shaliake opened this issue Mar 9, 2021 · 2 comments
Closed

Localisation patch for ltLT #25274

shaliake opened this issue Mar 9, 2021 · 2 comments
Labels
core Infrastructure work going on behind the scenes

Comments

@shaliake
Copy link

shaliake commented Mar 9, 2021

Hi! 👋

Firstly, thanks for your work on this project, I love material-ui for React! 🙂

Today I used patch-package to patch @material-ui/core@4.11.3 for the project I'm working on.

I have created a localization patch for Lithuania. That particular country has 3.0 million native speakers (2012).
I think that this issue will be rejected due to such a low amount of speakers, but man can try :D

diff --git a/node_modules/@material-ui/core/locale/index.d.ts b/node_modules/@material-ui/core/locale/index.d.ts
index 67e217f..b93a6cc 100644
--- a/node_modules/@material-ui/core/locale/index.d.ts
+++ b/node_modules/@material-ui/core/locale/index.d.ts
@@ -38,6 +38,7 @@ export declare const frFR: Localization;
 export declare const heIL: Localization;
 export declare const hiIN: Localization;
 export declare const huHU: Localization;
+export declare const ltLT: Localization;
 export declare const hyAM: Localization;
 export declare const idID: Localization;
 export declare const isIS: Localization;
diff --git a/node_modules/@material-ui/core/locale/index.js b/node_modules/@material-ui/core/locale/index.js
index 48593d0..79bcb35 100644
--- a/node_modules/@material-ui/core/locale/index.js
+++ b/node_modules/@material-ui/core/locale/index.js
@@ -3,7 +3,7 @@
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
-exports.zhCN = exports.viVN = exports.ukUA = exports.trTR = exports.svSE = exports.skSK = exports.ruRU = exports.roRO = exports.ptPT = exports.ptBR = exports.plPL = exports.nlNL = exports.koKR = exports.jaJP = exports.itIT = exports.isIS = exports.idID = exports.hyAM = exports.huHU = exports.hiIN = exports.heIL = exports.frFR = exports.fiFI = exports.faIR = exports.etEE = exports.esES = exports.enUS = exports.deDE = exports.csCZ = exports.caES = exports.bgBG = exports.azAZ = void 0;
+exports.zhCN = exports.ltLt = exports.viVN = exports.ukUA = exports.trTR = exports.svSE = exports.skSK = exports.ruRU = exports.roRO = exports.ptPT = exports.ptBR = exports.plPL = exports.nlNL = exports.koKR = exports.jaJP = exports.itIT = exports.isIS = exports.idID = exports.hyAM = exports.huHU = exports.hiIN = exports.heIL = exports.frFR = exports.fiFI = exports.faIR = exports.etEE = exports.esES = exports.enUS = exports.deDE = exports.csCZ = exports.caES = exports.bgBG = exports.azAZ = void 0;
 var azAZ = {
   props: {
     MuiBreadcrumbs: {
@@ -372,6 +372,58 @@ var enUS = {
   */
 };
 exports.enUS = enUS;
+
+var ltLt = {
+  props: {
+    MuiBreadcrumbs: {
+      expandText: 'Rodyti kelią',
+    },
+    MuiTablePagination: {
+      backIconButtonText: 'Praeitas',
+      labelRowsPerPage: 'Eilučių per psl.:',
+      labelDisplayedRows: ({ from, to, count }) =>
+  `${from}-${to} iš ${count !== -1 ? count : `daugiau nei ${to}`}`,
+      nextIconButtonText: 'Kitas',
+    },
+    MuiRating: {
+      getLabelText: value => `${value} žvaigdžių}`,
+      emptyLabelText: 'Tuščia',
+    },
+    MuiAutocomplete: {
+      clearText: 'Išvalyti',
+      closeText: 'Uždaryti',
+      loadingText: 'Kraunama…',
+      noOptionsText: 'Nėra pasirinkimų',
+      openText: 'Atverti',
+    },
+    MuiAlert: {
+      closeText: 'Uždaryti',
+    },
+    MuiPagination: {
+      'aria-label': 'Puslapių navigacija',
+      getItemAriaLabel: (type, page, selected) => {
+        if (type === 'page') {
+          return `${selected ? '' : 'Eiti į '}puslapį ${page}`;
+        }
+        if (type === 'first') {
+          return 'Eiti į pirmą';
+        }
+        if (type === 'last') {
+          return 'Eiti į paskutinį';
+        }
+        if (type === 'next') {
+          return 'Eiti į kitą';
+        }
+        if (type === 'previous') {
+          return 'Eiti į praeitą';
+        }
+        return undefined;
+      },
+    },
+  },
+};
+exports.ltLt = ltLt;
+
 var esES = {
   props: {
     MuiBreadcrumbs: {

This issue body was partially generated by patch-package.

@shaliake
Copy link
Author

shaliake commented Mar 9, 2021

I have made an typo.. language should be set as ltLT, not ltLt..

@oliviertassinari
Copy link
Member

@shaliake Thanks for sharing, it might help others. I'm closing per the criteria you mentioned. It starts to be manageable after 5m native speakers.

@zannager zannager added the core Infrastructure work going on behind the scenes label Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

No branches or pull requests

3 participants