feat(i18n): add support for Polish language (#102)
* feat(i18n): add support for Polish language
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "opencommit",
|
"name": "opencommit",
|
||||||
"version": "1.1.34",
|
"version": "1.1.36",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "opencommit",
|
"name": "opencommit",
|
||||||
"version": "1.1.34",
|
"version": "1.1.36",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@clack/prompts": "^0.6.1",
|
"@clack/prompts": "^0.6.1",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "opencommit",
|
"name": "opencommit",
|
||||||
"version": "1.1.34",
|
"version": "1.1.36",
|
||||||
"description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
|
"description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"git",
|
"git",
|
||||||
|
|||||||
@@ -11,13 +11,16 @@ const platform = process.platform;
|
|||||||
|
|
||||||
let separator = '';
|
let separator = '';
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case 'win32': // Windows
|
// Windows
|
||||||
|
case 'win32':
|
||||||
separator = path.sep;
|
separator = path.sep;
|
||||||
break;
|
break;
|
||||||
case 'darwin': // macOS
|
// macOS
|
||||||
|
case 'darwin':
|
||||||
separator = '';
|
separator = '';
|
||||||
break;
|
break;
|
||||||
case 'linux': // Linux
|
// Linux
|
||||||
|
case 'linux':
|
||||||
separator = '';
|
separator = '';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
+7
-3
@@ -13,6 +13,7 @@ import sv from '../i18n/sv.json' assert { type: 'json' };
|
|||||||
import nl from '../i18n/nl.json' assert { type: 'json' };
|
import nl from '../i18n/nl.json' assert { type: 'json' };
|
||||||
import ru from '../i18n/ru.json' assert { type: 'json' };
|
import ru from '../i18n/ru.json' assert { type: 'json' };
|
||||||
import id_ID from '../i18n/id_ID.json' assert { type: 'json' };
|
import id_ID from '../i18n/id_ID.json' assert { type: 'json' };
|
||||||
|
import pl from '../i18n/pl.json' assert { type: 'json' };
|
||||||
|
|
||||||
export enum I18nLocals {
|
export enum I18nLocals {
|
||||||
'en' = 'en',
|
'en' = 'en',
|
||||||
@@ -28,7 +29,8 @@ export enum I18nLocals {
|
|||||||
'es_ES' = 'es_ES',
|
'es_ES' = 'es_ES',
|
||||||
'sv' = 'sv',
|
'sv' = 'sv',
|
||||||
'ru' = 'ru',
|
'ru' = 'ru',
|
||||||
'id_ID' = 'id_ID'
|
'id_ID' = 'id_ID',
|
||||||
|
'pl' = 'pl',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const i18n = {
|
export const i18n = {
|
||||||
@@ -46,7 +48,8 @@ export const i18n = {
|
|||||||
sv,
|
sv,
|
||||||
id_ID,
|
id_ID,
|
||||||
nl,
|
nl,
|
||||||
ru
|
ru,
|
||||||
|
pl,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = {
|
export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = {
|
||||||
@@ -64,7 +67,8 @@ export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = {
|
|||||||
es_ES: ['es_ES', 'Spanish', 'español'],
|
es_ES: ['es_ES', 'Spanish', 'español'],
|
||||||
sv: ['sv', 'Swedish', 'Svenska'],
|
sv: ['sv', 'Swedish', 'Svenska'],
|
||||||
ru: ['ru', 'Russian', 'русский'],
|
ru: ['ru', 'Russian', 'русский'],
|
||||||
id_ID: ['id_ID', 'Bahasa', 'bahasa']
|
id_ID: ['id_ID', 'Bahasa', 'bahasa'],
|
||||||
|
pl: ['pl', 'Polish', 'Polski'],
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getI18nLocal(value: string): string | boolean {
|
export function getI18nLocal(value: string): string | boolean {
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"localLanguage": "polski",
|
||||||
|
"commitFix": "fix(server.ts): poprawa wielkości zmiennej port na pisane z dużymi literami PORT",
|
||||||
|
"commitFeat": "feat(server.ts): dodanie obsługi zmiennej środowiskowej process.env.PORT",
|
||||||
|
"commitDescription": "Zmienna port jest teraz nazwana PORT, co jest zgodne z konwencją nazewniczą ponieważ PORT jest stałą. Obsługa zmiennej środowiskowej process.env.PORT pozwala łatwiej zarządzać ustawieniami przy starcie."
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user