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",
|
||||
"version": "1.1.34",
|
||||
"version": "1.1.36",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "opencommit",
|
||||
"version": "1.1.34",
|
||||
"version": "1.1.36",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@clack/prompts": "^0.6.1",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"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 🤯🔫",
|
||||
"keywords": [
|
||||
"git",
|
||||
|
||||
@@ -11,13 +11,16 @@ const platform = process.platform;
|
||||
|
||||
let separator = '';
|
||||
switch (platform) {
|
||||
case 'win32': // Windows
|
||||
// Windows
|
||||
case 'win32':
|
||||
separator = path.sep;
|
||||
break;
|
||||
case 'darwin': // macOS
|
||||
// macOS
|
||||
case 'darwin':
|
||||
separator = '';
|
||||
break;
|
||||
case 'linux': // Linux
|
||||
// Linux
|
||||
case 'linux':
|
||||
separator = '';
|
||||
break;
|
||||
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 ru from '../i18n/ru.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 {
|
||||
'en' = 'en',
|
||||
@@ -28,7 +29,8 @@ export enum I18nLocals {
|
||||
'es_ES' = 'es_ES',
|
||||
'sv' = 'sv',
|
||||
'ru' = 'ru',
|
||||
'id_ID' = 'id_ID'
|
||||
'id_ID' = 'id_ID',
|
||||
'pl' = 'pl',
|
||||
}
|
||||
|
||||
export const i18n = {
|
||||
@@ -46,7 +48,8 @@ export const i18n = {
|
||||
sv,
|
||||
id_ID,
|
||||
nl,
|
||||
ru
|
||||
ru,
|
||||
pl,
|
||||
};
|
||||
|
||||
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'],
|
||||
sv: ['sv', 'Swedish', 'Svenska'],
|
||||
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 {
|
||||
|
||||
@@ -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