timeint2-cli 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -2
- package/bin/timeint2.js +8 -0
- package/lib/cli.js +136 -0
- package/lib/client.js +64 -0
- package/lib/config.js +37 -0
- package/lib/i18n.js +30 -0
- package/locales/am.json +30 -0
- package/locales/ar.json +30 -0
- package/locales/bho.json +30 -0
- package/locales/bn.json +30 -0
- package/locales/de.json +30 -0
- package/locales/en.json +30 -0
- package/locales/es.json +30 -0
- package/locales/fa.json +30 -0
- package/locales/fil.json +30 -0
- package/locales/fr.json +30 -0
- package/locales/gu.json +30 -0
- package/locales/ha.json +30 -0
- package/locales/he.json +30 -0
- package/locales/hi.json +30 -0
- package/locales/id.json +30 -0
- package/locales/it.json +30 -0
- package/locales/ja.json +30 -0
- package/locales/jv.json +30 -0
- package/locales/kn.json +30 -0
- package/locales/ko.json +30 -0
- package/locales/mr.json +30 -0
- package/locales/ms.json +30 -0
- package/locales/nl.json +30 -0
- package/locales/pa.json +30 -0
- package/locales/pl.json +30 -0
- package/locales/pt.json +30 -0
- package/locales/ro.json +30 -0
- package/locales/ru.json +30 -0
- package/locales/sw.json +30 -0
- package/locales/ta.json +30 -0
- package/locales/te.json +30 -0
- package/locales/th.json +30 -0
- package/locales/tr.json +30 -0
- package/locales/uk.json +30 -0
- package/locales/ur.json +30 -0
- package/locales/vi.json +30 -0
- package/locales/yo.json +30 -0
- package/locales/zh_Hans.json +30 -0
- package/locales/zh_Hant.json +30 -0
- package/locales/zh_Hant_HK.json +30 -0
- package/package.json +26 -4
package/README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# timeint2-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Multilingual command-line client for the public Timeint2 API. It ships interface catalogs for all 40 Timeint2 locales.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install --global timeint2-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
No account or API key is currently required.
|
|
12
|
+
|
|
13
|
+
## Use
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
timeint2 time Europe/London
|
|
17
|
+
timeint2 convert 2026-11-18T09:30:00 --from Europe/London --to Asia/Hong_Kong
|
|
18
|
+
timeint2 timezones America --limit 20
|
|
19
|
+
timeint2 time UTC --json
|
|
20
|
+
timeint2 --locale es time Europe/Madrid
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The default API origin is `https://currentlocaltime.co.uk`. Override it for another Timeint2 domain or a development server:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
timeint2 config set-base-url https://currentlocaltime.co.uk
|
|
27
|
+
TIMEINT2_API_BASE_URL=https://currentlocaltime.co.uk timeint2 time UTC
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Configuration is stored in `~/.config/timeint2/config.json` with user-only permissions. Set `TIMEINT2_CONFIG` to use another location.
|
|
31
|
+
|
|
32
|
+
Select the interface language with `--locale <locale>` or `TIMEINT2_LOCALE`. Locale codes match the public sites, including `zh_Hans`, `zh_Hant`, and `zh_Hant_HK`; English is the fallback.
|
|
33
|
+
|
|
34
|
+
API documentation: <https://currentlocaltime.co.uk/developers/api/>
|
package/bin/timeint2.js
ADDED
package/lib/cli.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const pkg = require("../package.json");
|
|
4
|
+
const { apiRequest, DEFAULT_BASE_URL, normalizeBaseUrl } = require("./client");
|
|
5
|
+
const { configPath, readConfig, resolveBaseUrl, writeConfig } = require("./config");
|
|
6
|
+
const { format, loadMessages, normalizeLocale } = require("./i18n");
|
|
7
|
+
|
|
8
|
+
function createHelp(messages) {
|
|
9
|
+
return `timeint2 ${pkg.version} — ${messages.description}
|
|
10
|
+
|
|
11
|
+
${messages.usage}:
|
|
12
|
+
timeint2 time [timezone] [--json]
|
|
13
|
+
timeint2 convert <datetime> --from <timezone> --to <timezone> [--json]
|
|
14
|
+
timeint2 timezones [query] [--limit <1-200>] [--json]
|
|
15
|
+
timeint2 docs
|
|
16
|
+
timeint2 config get
|
|
17
|
+
timeint2 config set-base-url <url>
|
|
18
|
+
timeint2 config reset
|
|
19
|
+
|
|
20
|
+
${messages.global_options}:
|
|
21
|
+
--base-url <url> ${messages.override_api_origin}
|
|
22
|
+
--locale <locale> ${messages.select_locale}
|
|
23
|
+
--json ${messages.print_raw_json}
|
|
24
|
+
--help ${messages.show_help}
|
|
25
|
+
--version ${messages.show_version}
|
|
26
|
+
|
|
27
|
+
${messages.environment}:
|
|
28
|
+
TIMEINT2_API_BASE_URL ${format(messages.api_origin_default, { base_url: DEFAULT_BASE_URL })}
|
|
29
|
+
TIMEINT2_CONFIG ${messages.alternate_config}
|
|
30
|
+
TIMEINT2_LOCALE ${messages.locale_environment}
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const HELP = createHelp(loadMessages("en"));
|
|
35
|
+
|
|
36
|
+
function takeOption(args, name) {
|
|
37
|
+
const index = args.indexOf(name);
|
|
38
|
+
if (index === -1) return undefined;
|
|
39
|
+
if (index === args.length - 1) throw new Error(`${name} requires a value`);
|
|
40
|
+
const value = args[index + 1];
|
|
41
|
+
args.splice(index, 2);
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function takeFlag(args, name) {
|
|
46
|
+
const index = args.indexOf(name);
|
|
47
|
+
if (index === -1) return false;
|
|
48
|
+
args.splice(index, 1);
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function printJson(value) {
|
|
53
|
+
process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function run(inputArgs) {
|
|
57
|
+
const args = [...inputArgs];
|
|
58
|
+
const localeOption = takeOption(args, "--locale");
|
|
59
|
+
const requestedLocale = localeOption || process.env.TIMEINT2_LOCALE || "en";
|
|
60
|
+
const locale = normalizeLocale(requestedLocale);
|
|
61
|
+
const messages = loadMessages(locale || "en");
|
|
62
|
+
if (!locale) throw new Error(format(messages.unknown_locale, { locale: requestedLocale }));
|
|
63
|
+
if (!args.length || takeFlag(args, "--help") || takeFlag(args, "-h")) {
|
|
64
|
+
process.stdout.write(createHelp(messages));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (takeFlag(args, "--version") || takeFlag(args, "-v")) {
|
|
68
|
+
process.stdout.write(`${pkg.version}\n`);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const json = takeFlag(args, "--json");
|
|
72
|
+
const baseUrlOption = takeOption(args, "--base-url");
|
|
73
|
+
const command = args.shift();
|
|
74
|
+
|
|
75
|
+
if (command === "config") {
|
|
76
|
+
const action = args.shift();
|
|
77
|
+
if (action === "get") {
|
|
78
|
+
printJson({ path: configPath(), baseUrl: resolveBaseUrl(baseUrlOption) });
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (action === "set-base-url") {
|
|
82
|
+
const value = args.shift();
|
|
83
|
+
if (!value) throw new Error(messages.config_requires_url);
|
|
84
|
+
const config = readConfig();
|
|
85
|
+
config.baseUrl = normalizeBaseUrl(value);
|
|
86
|
+
const filename = writeConfig(config);
|
|
87
|
+
process.stdout.write(`${format(messages.saved, { value: config.baseUrl, filename })}\n`);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (action === "reset") {
|
|
91
|
+
const filename = writeConfig({});
|
|
92
|
+
process.stdout.write(`${format(messages.reset, { filename })}\n`);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
throw new Error(messages.config_requires_action);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const baseUrl = resolveBaseUrl(baseUrlOption);
|
|
99
|
+
if (command === "docs") {
|
|
100
|
+
process.stdout.write(`${baseUrl}/developers/api/\n`);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (command === "time") {
|
|
104
|
+
const timezone = args.shift() || "UTC";
|
|
105
|
+
if (args.length) throw new Error(format(messages.unexpected_argument, { argument: args[0] }));
|
|
106
|
+
const result = await apiRequest("/api/v1/time", { timezone }, { baseUrl });
|
|
107
|
+
if (json) return printJson(result);
|
|
108
|
+
process.stdout.write(`${result.local_iso} ${result.timezone} (${result.utc_offset} ${result.abbreviation || ""})\n`);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (command === "convert") {
|
|
112
|
+
const datetime = args.shift();
|
|
113
|
+
const from = takeOption(args, "--from");
|
|
114
|
+
const to = takeOption(args, "--to");
|
|
115
|
+
if (!datetime || !from || !to) {
|
|
116
|
+
throw new Error(messages.convert_requires);
|
|
117
|
+
}
|
|
118
|
+
if (args.length) throw new Error(format(messages.unexpected_argument, { argument: args[0] }));
|
|
119
|
+
const result = await apiRequest("/api/v1/convert", { from, to, datetime }, { baseUrl });
|
|
120
|
+
if (json) return printJson(result);
|
|
121
|
+
process.stdout.write(`${result.source.local_iso} → ${result.target.local_iso}\n`);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (command === "timezones") {
|
|
125
|
+
const limit = takeOption(args, "--limit");
|
|
126
|
+
const query = args.shift() || "";
|
|
127
|
+
if (args.length) throw new Error(format(messages.unexpected_argument, { argument: args[0] }));
|
|
128
|
+
const result = await apiRequest("/api/v1/timezones", { q: query, limit }, { baseUrl });
|
|
129
|
+
if (json) return printJson(result);
|
|
130
|
+
process.stdout.write(`${result.timezones.join("\n")}\n`);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
throw new Error(format(messages.unknown_command, { command }));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
module.exports = { HELP, createHelp, run, takeFlag, takeOption };
|
package/lib/client.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const DEFAULT_BASE_URL = "https://currentlocaltime.co.uk";
|
|
4
|
+
const USER_AGENT = "timeint2-cli/0.1.0";
|
|
5
|
+
|
|
6
|
+
class ApiError extends Error {
|
|
7
|
+
constructor(message, status, code) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "ApiError";
|
|
10
|
+
this.status = status;
|
|
11
|
+
this.code = code;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function normalizeBaseUrl(value) {
|
|
16
|
+
const url = new URL(value || DEFAULT_BASE_URL);
|
|
17
|
+
if (!/^https?:$/.test(url.protocol)) {
|
|
18
|
+
throw new Error("API base URL must use http or https");
|
|
19
|
+
}
|
|
20
|
+
return url.toString().replace(/\/$/, "");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function apiRequest(path, params = {}, options = {}) {
|
|
24
|
+
const baseUrl = normalizeBaseUrl(options.baseUrl || DEFAULT_BASE_URL);
|
|
25
|
+
const url = new URL(path, `${baseUrl}/`);
|
|
26
|
+
for (const [key, value] of Object.entries(params)) {
|
|
27
|
+
if (value !== undefined && value !== null && value !== "") {
|
|
28
|
+
url.searchParams.set(key, String(value));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const controller = new AbortController();
|
|
32
|
+
const timeout = setTimeout(() => controller.abort(), options.timeoutMs || 10000);
|
|
33
|
+
let response;
|
|
34
|
+
try {
|
|
35
|
+
response = await fetch(url, {
|
|
36
|
+
headers: { Accept: "application/json", "User-Agent": USER_AGENT },
|
|
37
|
+
signal: controller.signal,
|
|
38
|
+
});
|
|
39
|
+
} catch (error) {
|
|
40
|
+
if (error.name === "AbortError") {
|
|
41
|
+
throw new ApiError(`request timed out after ${options.timeoutMs || 10000}ms`);
|
|
42
|
+
}
|
|
43
|
+
throw new ApiError(`could not reach ${url.origin}: ${error.message}`);
|
|
44
|
+
} finally {
|
|
45
|
+
clearTimeout(timeout);
|
|
46
|
+
}
|
|
47
|
+
let payload;
|
|
48
|
+
try {
|
|
49
|
+
payload = await response.json();
|
|
50
|
+
} catch (_error) {
|
|
51
|
+
throw new ApiError(`API returned non-JSON HTTP ${response.status}`, response.status);
|
|
52
|
+
}
|
|
53
|
+
if (!response.ok) {
|
|
54
|
+
const apiError = payload && payload.error;
|
|
55
|
+
throw new ApiError(
|
|
56
|
+
(apiError && apiError.message) || `API request failed with HTTP ${response.status}`,
|
|
57
|
+
response.status,
|
|
58
|
+
apiError && apiError.code,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return payload;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
module.exports = { ApiError, DEFAULT_BASE_URL, apiRequest, normalizeBaseUrl };
|
package/lib/config.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const fs = require("node:fs");
|
|
4
|
+
const os = require("node:os");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const { DEFAULT_BASE_URL, normalizeBaseUrl } = require("./client");
|
|
7
|
+
|
|
8
|
+
function configPath(env = process.env) {
|
|
9
|
+
if (env.TIMEINT2_CONFIG) return path.resolve(env.TIMEINT2_CONFIG);
|
|
10
|
+
const base = env.XDG_CONFIG_HOME || path.join(os.homedir(), ".config");
|
|
11
|
+
return path.join(base, "timeint2", "config.json");
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function readConfig(env = process.env) {
|
|
15
|
+
const filename = configPath(env);
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(fs.readFileSync(filename, "utf8"));
|
|
18
|
+
} catch (error) {
|
|
19
|
+
if (error.code === "ENOENT") return {};
|
|
20
|
+
throw new Error(`could not read config ${filename}: ${error.message}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function writeConfig(config, env = process.env) {
|
|
25
|
+
const filename = configPath(env);
|
|
26
|
+
fs.mkdirSync(path.dirname(filename), { recursive: true, mode: 0o700 });
|
|
27
|
+
fs.writeFileSync(filename, `${JSON.stringify(config, null, 2)}\n`, { mode: 0o600 });
|
|
28
|
+
fs.chmodSync(filename, 0o600);
|
|
29
|
+
return filename;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function resolveBaseUrl(commandValue, env = process.env) {
|
|
33
|
+
const configured = readConfig(env).baseUrl;
|
|
34
|
+
return normalizeBaseUrl(commandValue || env.TIMEINT2_API_BASE_URL || configured || DEFAULT_BASE_URL);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
module.exports = { configPath, readConfig, resolveBaseUrl, writeConfig };
|
package/lib/i18n.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const fs = require("node:fs");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
|
|
6
|
+
const LOCALES_DIRECTORY = path.join(__dirname, "..", "locales");
|
|
7
|
+
|
|
8
|
+
function availableLocales() {
|
|
9
|
+
return fs.readdirSync(LOCALES_DIRECTORY)
|
|
10
|
+
.filter((name) => name.endsWith(".json"))
|
|
11
|
+
.map((name) => name.slice(0, -5));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function normalizeLocale(value) {
|
|
15
|
+
const requested = String(value || "en").replaceAll("-", "_");
|
|
16
|
+
const locales = availableLocales();
|
|
17
|
+
return locales.find((locale) => locale.toLowerCase() === requested.toLowerCase()) || null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function loadMessages(value) {
|
|
21
|
+
const locale = normalizeLocale(value);
|
|
22
|
+
if (!locale) return null;
|
|
23
|
+
return JSON.parse(fs.readFileSync(path.join(LOCALES_DIRECTORY, `${locale}.json`), "utf8"));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function format(message, values = {}) {
|
|
27
|
+
return message.replace(/\{([a-z_]+)\}/g, (_, key) => String(values[key] ?? `{${key}}`));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
module.exports = { availableLocales, format, loadMessages, normalizeLocale };
|
package/locales/am.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "የአሁኑ ሰዓት እና IANA የሰዓት ሰቅ ልወጣ ከእርስዎ ተርሚናል",
|
|
3
|
+
"usage": "አጠቃቀም",
|
|
4
|
+
"global_options": "ዓለም አቀፍ አማራጮች",
|
|
5
|
+
"environment": "አካባቢ",
|
|
6
|
+
"override_api_origin": "የኤፒአይ አመጣጥን መሻር",
|
|
7
|
+
"print_raw_json": "ጥሬ JSON ያትሙ",
|
|
8
|
+
"select_locale": "የበይነገጽ አካባቢን ይምረጡ",
|
|
9
|
+
"show_help": "ይህንን እገዛ አሳይ",
|
|
10
|
+
"show_version": "ስሪቱን አሳይ",
|
|
11
|
+
"api_origin_default": "የኤፒአይ አመጣጥ (ነባሪ {base_url})",
|
|
12
|
+
"alternate_config": "ተለዋጭ ውቅር ፋይል",
|
|
13
|
+
"locale_environment": "የበይነገጽ አካባቢ (ነባሪ en)",
|
|
14
|
+
"option_requires_value": "{option} እሴት ይጠይቃል",
|
|
15
|
+
"saved": "ውስጥ {value} ተቀምጧል {filename}",
|
|
16
|
+
"reset": "ዳግም አስጀምር {filename}",
|
|
17
|
+
"config_requires_url": "ውቅር set-base-url ዩአርኤል ያስፈልገዋል",
|
|
18
|
+
"config_requires_action": "ውቅር ማግኘት፣ set-base-url ወይም ዳግም ማስጀመር ያስፈልገዋል",
|
|
19
|
+
"unexpected_argument": "ያልተጠበቀ ክርክር {argument}",
|
|
20
|
+
"convert_requires": "መለወጥ <datetime> --from <timezone> --to <timezone> ያስፈልገዋል",
|
|
21
|
+
"unknown_command": "ያልታወቀ ትዕዛዝ {command}. አሂድ timeint2 --help",
|
|
22
|
+
"unknown_locale": "ያልታወቀ አካባቢ {locale}. አሂድ timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "IANA የሰዓት ሰቅ ውስጥ የአሁኑን ጊዜ አሳይ",
|
|
25
|
+
"convert": "ISO 8601 ቀን-ጊዜን በ IANA የሰዓት ሰቆች መካከል ይለውጡ",
|
|
26
|
+
"timezones": "IANA የሰዓት ሰቅ ለዪዎች ፈልግ",
|
|
27
|
+
"docs": "የኤፒአይ ሰነድ ዩአርኤልን ያትሙ",
|
|
28
|
+
"config": "CLI ውቅረትን ያንብቡ ወይም ያዘምኑ"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/ar.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "الوقت الحالي و IANA تحويل المنطقة الزمنية من جهازك",
|
|
3
|
+
"usage": "الاستخدام",
|
|
4
|
+
"global_options": "الخيارات العامة",
|
|
5
|
+
"environment": "البيئة",
|
|
6
|
+
"override_api_origin": "تجاوز أصل API",
|
|
7
|
+
"print_raw_json": "طباعة JSON الخام",
|
|
8
|
+
"select_locale": "اختيار لغة الواجهة",
|
|
9
|
+
"show_help": "عرض هذه المساعدة",
|
|
10
|
+
"show_version": "عرض الإصدار",
|
|
11
|
+
"api_origin_default": "أصل API (افتراضي: {base_url})",
|
|
12
|
+
"alternate_config": "ملف التكوين البديل",
|
|
13
|
+
"locale_environment": "لغة الواجهة (افتراضي: en)",
|
|
14
|
+
"option_requires_value": "{option} يتطلب قيمة",
|
|
15
|
+
"saved": "تم حفظ {value} في {filename}",
|
|
16
|
+
"reset": "تم إعادة ضبط {filename}",
|
|
17
|
+
"config_requires_url": "تعيين config set-base-url يتطلب عنوان URL",
|
|
18
|
+
"config_requires_action": "config يتطلب get، set-base-url، أو reset",
|
|
19
|
+
"unexpected_argument": "وسيط غير متوقع: {argument}",
|
|
20
|
+
"convert_requires": "يتطلب التحويل <datetime> --from <timezone> --to <timezone>",
|
|
21
|
+
"unknown_command": "أمر غير معروف: {command}. شغل timeint2 --help",
|
|
22
|
+
"unknown_locale": "لغة غير معروفة: {locale}. شغل timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "عرض الوقت الحالي في IANA منطقة زمنية",
|
|
25
|
+
"convert": "تحويل تاريخ ووقت ISO 8601 بين IANA المناطق الزمنية",
|
|
26
|
+
"timezones": "البحث عن معرفات المناطق الزمنية IANA",
|
|
27
|
+
"docs": "طباعة رابط توثيق API",
|
|
28
|
+
"config": "قراءة أو تحديث إعدادات CLI"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/bho.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "अपने टर्मिनल से वर्तमान समय अउर IANA समय-जोन रूपांतरण",
|
|
3
|
+
"usage": "उपयोग",
|
|
4
|
+
"global_options": "ग्लोबल विकल्प",
|
|
5
|
+
"environment": "परिवेश",
|
|
6
|
+
"override_api_origin": "API मूल स्थान के अधिलेखित करीं",
|
|
7
|
+
"print_raw_json": "कच्चा JSON प्रिंट करीं",
|
|
8
|
+
"select_locale": "इंटरफेस भाषा चुनल जाव",
|
|
9
|
+
"show_help": "ई मदद देखाईं",
|
|
10
|
+
"show_version": "संस्करण देखाईं",
|
|
11
|
+
"api_origin_default": "API मूल स्थान (डिफ़ॉल्ट: {base_url})",
|
|
12
|
+
"alternate_config": "वैकल्पिक कॉन्फ़िगरेशन फाइल",
|
|
13
|
+
"locale_environment": "इंटरफेस लोकल (डिफ़ॉल्ट: en)",
|
|
14
|
+
"option_requires_value": "{option} खातिर एक मान चाहीं",
|
|
15
|
+
"saved": "{value} के {filename} में सुरक्षित कइल गइल",
|
|
16
|
+
"reset": "{filename} रिसेट कइल गइल",
|
|
17
|
+
"config_requires_url": "config set-base-url खातिर एगो URL चाहीं",
|
|
18
|
+
"config_requires_action": "config में get, set-base-url, या reset चाहीं",
|
|
19
|
+
"unexpected_argument": "अनपेक्षित आर्गुमेंट: {argument}",
|
|
20
|
+
"convert_requires": "convert खातिर <datetime> --from <timezone> --to <timezone> चाहीं",
|
|
21
|
+
"unknown_command": "अज्ञात कमांड: {command}. चला timeint2 --help",
|
|
22
|
+
"unknown_locale": "अज्ञात लोकल: {locale}. चला timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "वर्तमान समय देखाईं IANA टाइम ज़ोन में",
|
|
25
|
+
"convert": "ISO 8601 tareekh-samay ke IANA samay kshetron ke beech badli",
|
|
26
|
+
"timezones": "IANA samay-kshetra pahichan khoji",
|
|
27
|
+
"docs": "API dastavez URL print kari",
|
|
28
|
+
"config": "CLI configuration padhi ya update kari"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/bn.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "আপনার টার্মিনাল থেকে বর্তমান সময় এবং IANA সময়ক্ষেত্র রূপান্তর",
|
|
3
|
+
"usage": "ব্যবহার",
|
|
4
|
+
"global_options": "গ্লোবাল বিকল্প",
|
|
5
|
+
"environment": "পরিবেশ",
|
|
6
|
+
"override_api_origin": "API উৎস ওভাররাইড করুন",
|
|
7
|
+
"print_raw_json": "কাঁচা JSON প্রিন্ট করুন",
|
|
8
|
+
"select_locale": "ইন্টারফেস লোকেল নির্বাচন করুন",
|
|
9
|
+
"show_help": "এই সাহায্য দেখান",
|
|
10
|
+
"show_version": "সংস্করণ দেখান",
|
|
11
|
+
"api_origin_default": "API উৎস (ডিফল্ট: {base_url})",
|
|
12
|
+
"alternate_config": "বিকল্প কনফিগারেশন ফাইল",
|
|
13
|
+
"locale_environment": "ইন্টারফেস লোকেল (ডিফল্ট: en)",
|
|
14
|
+
"option_requires_value": "{option} একটি মান প্রয়োজন",
|
|
15
|
+
"saved": "{filename}-এ {value} সংরক্ষিত হয়েছে",
|
|
16
|
+
"reset": "{filename} রিসেট করা হয়েছে",
|
|
17
|
+
"config_requires_url": "config set-base-url একটি URL প্রয়োজন",
|
|
18
|
+
"config_requires_action": "config-এ get, set-base-url, বা reset প্রয়োজন",
|
|
19
|
+
"unexpected_argument": "অপ্রত্যাশিত আর্গুমেন্ট: {argument}",
|
|
20
|
+
"convert_requires": "convert-এ <datetime> --from <timezone> --to <timezone> প্রয়োজন",
|
|
21
|
+
"unknown_command": "অজানা কমান্ড: {command}। চালান timeint2 --help",
|
|
22
|
+
"unknown_locale": "অজানা লোকেল: {locale}। চালান timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "একটি IANA টাইম জোন-এ বর্তমান সময় দেখান",
|
|
25
|
+
"convert": "ISO 8601 তারিখ-সময়কে IANA সময় অঞ্চলগুলোর মধ্যে রূপান্তর করুন",
|
|
26
|
+
"timezones": "IANA সময়-অঞ্চল আইডেন্টিফায়ার অনুসন্ধান করুন",
|
|
27
|
+
"docs": "API ডকুমেন্টেশন URL প্রিন্ট করুন",
|
|
28
|
+
"config": "CLI কনফিগারেশন পড়া বা আপডেট করুন"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/de.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Aktuelle Zeit und IANA-Zeitzonenumrechnung von Ihrem Terminal",
|
|
3
|
+
"usage": "Nutzung",
|
|
4
|
+
"global_options": "Globale Optionen",
|
|
5
|
+
"environment": "Umgebung",
|
|
6
|
+
"override_api_origin": "API-Ursprung überschreiben",
|
|
7
|
+
"print_raw_json": "Rohes JSON ausgeben",
|
|
8
|
+
"select_locale": "Schnittstellen-Sprache auswählen",
|
|
9
|
+
"show_help": "Diese Hilfe anzeigen",
|
|
10
|
+
"show_version": "Version anzeigen",
|
|
11
|
+
"api_origin_default": "API-Ursprung (Standard: {base_url})",
|
|
12
|
+
"alternate_config": "Alternativkonfigurationsdatei",
|
|
13
|
+
"locale_environment": "Schnittstellenlokalität (Standard: en)",
|
|
14
|
+
"option_requires_value": "{option} erfordert einen Wert",
|
|
15
|
+
"saved": "{value} in {filename} gespeichert",
|
|
16
|
+
"reset": "{filename} zurückgesetzt",
|
|
17
|
+
"config_requires_url": "config set-base-url erfordert eine URL",
|
|
18
|
+
"config_requires_action": "config erfordert get, set-base-url oder reset",
|
|
19
|
+
"unexpected_argument": "unerwartetes Argument: {argument}",
|
|
20
|
+
"convert_requires": "convert erfordert <datetime> --from <timezone> --to <timezone>",
|
|
21
|
+
"unknown_command": "unbekannter Befehl: {command}. Führen Sie timeint2 --help aus",
|
|
22
|
+
"unknown_locale": "unbekannte Lokalisierung: {locale}. Führen Sie timeint2 --help aus",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "Zeige die aktuelle Zeit in einer IANA Zeitzone",
|
|
25
|
+
"convert": "Konvertiere ein ISO 8601 Datum-Zeit zwischen IANA Zeitzonen",
|
|
26
|
+
"timezones": "Suche IANA Zeitzonenbezeichner",
|
|
27
|
+
"docs": "Drucke die API-Dokumentations-URL",
|
|
28
|
+
"config": "Lese oder aktualisiere CLI Konfiguration"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/en.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Current time and IANA time-zone conversion from your terminal",
|
|
3
|
+
"usage": "Usage",
|
|
4
|
+
"global_options": "Global options",
|
|
5
|
+
"environment": "Environment",
|
|
6
|
+
"override_api_origin": "Override the API origin",
|
|
7
|
+
"print_raw_json": "Print raw JSON",
|
|
8
|
+
"select_locale": "Select the interface locale",
|
|
9
|
+
"show_help": "Show this help",
|
|
10
|
+
"show_version": "Show the version",
|
|
11
|
+
"api_origin_default": "API origin (default: {base_url})",
|
|
12
|
+
"alternate_config": "Alternate configuration file",
|
|
13
|
+
"locale_environment": "Interface locale (default: en)",
|
|
14
|
+
"option_requires_value": "{option} requires a value",
|
|
15
|
+
"saved": "Saved {value} in {filename}",
|
|
16
|
+
"reset": "Reset {filename}",
|
|
17
|
+
"config_requires_url": "config set-base-url requires a URL",
|
|
18
|
+
"config_requires_action": "config requires get, set-base-url, or reset",
|
|
19
|
+
"unexpected_argument": "unexpected argument: {argument}",
|
|
20
|
+
"convert_requires": "convert requires <datetime> --from <timezone> --to <timezone>",
|
|
21
|
+
"unknown_command": "unknown command: {command}. Run timeint2 --help",
|
|
22
|
+
"unknown_locale": "unknown locale: {locale}. Run timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "Show the current time in an IANA time zone",
|
|
25
|
+
"convert": "Convert an ISO 8601 date-time between IANA time zones",
|
|
26
|
+
"timezones": "Search IANA time-zone identifiers",
|
|
27
|
+
"docs": "Print the API documentation URL",
|
|
28
|
+
"config": "Read or update CLI configuration"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/es.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Hora actual y conversión de zona horaria IANA desde su terminal",
|
|
3
|
+
"usage": "Uso",
|
|
4
|
+
"global_options": "Opciones globales",
|
|
5
|
+
"environment": "Entorno",
|
|
6
|
+
"override_api_origin": "Anular el origen de la API",
|
|
7
|
+
"print_raw_json": "Imprimir JSON en bruto",
|
|
8
|
+
"select_locale": "Seleccionar el idioma de la interfaz",
|
|
9
|
+
"show_help": "Mostrar esta ayuda",
|
|
10
|
+
"show_version": "Mostrar la versión",
|
|
11
|
+
"api_origin_default": "Origen de la API (predeterminado: {base_url})",
|
|
12
|
+
"alternate_config": "Archivo de configuración alternativo",
|
|
13
|
+
"locale_environment": "Configuración regional de la interfaz (predeterminado: en)",
|
|
14
|
+
"option_requires_value": "{option} requiere un valor",
|
|
15
|
+
"saved": "Guardado {value} en {filename}",
|
|
16
|
+
"reset": "Restablecer {filename}",
|
|
17
|
+
"config_requires_url": "config set-base-url requiere una URL",
|
|
18
|
+
"config_requires_action": "config requiere get, set-base-url o reset",
|
|
19
|
+
"unexpected_argument": "argumento inesperado: {argument}",
|
|
20
|
+
"convert_requires": "convert requiere <datetime> --from <timezone> --to <timezone>",
|
|
21
|
+
"unknown_command": "comando desconocido: {command}. Ejecute timeint2 --help",
|
|
22
|
+
"unknown_locale": "configuración regional desconocida: {locale}. Ejecute timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "Mostrar la hora actual en una zona horaria IANA",
|
|
25
|
+
"convert": "Convertir una fecha y hora ISO 8601 entre zonas horarias IANA",
|
|
26
|
+
"timezones": "Buscar identificadores de zonas horarias IANA",
|
|
27
|
+
"docs": "Imprimir la URL de la documentación de la API",
|
|
28
|
+
"config": "Leer o actualizar la configuración CLI"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/fa.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "زمان فعلی و تبدیل منطقه زمانی IANA از ترمینال شما",
|
|
3
|
+
"usage": "استفاده",
|
|
4
|
+
"global_options": "گزینههای جهانی",
|
|
5
|
+
"environment": "محیط",
|
|
6
|
+
"override_api_origin": "بازنویسی مبدأ API",
|
|
7
|
+
"print_raw_json": "چاپ خام JSON",
|
|
8
|
+
"select_locale": "انتخاب محلی رابط",
|
|
9
|
+
"show_help": "نمایش این راهنما",
|
|
10
|
+
"show_version": "نمایش نسخه",
|
|
11
|
+
"api_origin_default": "مبدأ API (پیشفرض: {base_url})",
|
|
12
|
+
"alternate_config": "فایل پیکربندی جایگزین",
|
|
13
|
+
"locale_environment": "زبان رابط (پیشفرض: en)",
|
|
14
|
+
"option_requires_value": "{option} نیاز به مقدار دارد",
|
|
15
|
+
"saved": "{value} در {filename} ذخیره شد",
|
|
16
|
+
"reset": "{filename} بازنشانی شد",
|
|
17
|
+
"config_requires_url": "config set-base-url نیاز به یک URL دارد",
|
|
18
|
+
"config_requires_action": "config نیاز به get، set-base-url یا reset دارد",
|
|
19
|
+
"unexpected_argument": "آرگومان غیرمنتظره: {argument}",
|
|
20
|
+
"convert_requires": "convert نیاز به <datetime> --from <timezone> --to <timezone> دارد",
|
|
21
|
+
"unknown_command": "دستور ناشناخته: {command}. اجرای timeint2 --help",
|
|
22
|
+
"unknown_locale": "زبان ناشناخته: {locale}. اجرای timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "نمایش زمان فعلی در منطقه زمانی IANA",
|
|
25
|
+
"convert": "تبدیل یک زمان-تاریخ ISO 8601 بین IANA مناطق زمانی",
|
|
26
|
+
"timezones": "جستجوی شناسههای منطقه زمانی IANA",
|
|
27
|
+
"docs": "چاپ URL مستندات API",
|
|
28
|
+
"config": "خواندن یا بهروزرسانی پیکربندی CLI"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/fil.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Kasalukuyang oras at IANA conversion ng time-zone mula sa iyong terminal",
|
|
3
|
+
"usage": "Paggamit",
|
|
4
|
+
"global_options": "Global na mga opsyon",
|
|
5
|
+
"environment": "Kapaligiran",
|
|
6
|
+
"override_api_origin": "Palitan ang pinagmulan ng API",
|
|
7
|
+
"print_raw_json": "I-print ang raw JSON",
|
|
8
|
+
"select_locale": "Piliin ang interface locale",
|
|
9
|
+
"show_help": "Ipakita ang tulong na ito",
|
|
10
|
+
"show_version": "Ipakita ang bersyon",
|
|
11
|
+
"api_origin_default": "Pinagmulan ng API (default: {base_url})",
|
|
12
|
+
"alternate_config": "Alternatibong file ng configuration",
|
|
13
|
+
"locale_environment": "Lokal ng interface (default: en)",
|
|
14
|
+
"option_requires_value": "{option} ay nangangailangan ng isang halaga",
|
|
15
|
+
"saved": "Nai-save ang {value} sa {filename}",
|
|
16
|
+
"reset": "Na-reset ang {filename}",
|
|
17
|
+
"config_requires_url": "ang config set-base-url ay nangangailangan ng isang URL",
|
|
18
|
+
"config_requires_action": "ang config ay nangangailangan ng get, set-base-url, o reset",
|
|
19
|
+
"unexpected_argument": "hindi inaasahang argumento: {argument}",
|
|
20
|
+
"convert_requires": "ang convert ay nangangailangan ng <datetime> --from <timezone> --to <timezone>",
|
|
21
|
+
"unknown_command": "hindi kilalang utos: {command}. Patakbuhin ang timeint2 --help",
|
|
22
|
+
"unknown_locale": "hindi kilalang lokal: {locale}. Patakbuhin ang timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "Ipakita ang kasalukuyang oras sa IANA na time zone",
|
|
25
|
+
"convert": "I-convert ang ISO 8601 petsa-oras sa pagitan ng IANA mga time zone",
|
|
26
|
+
"timezones": "Maghanap ng IANA mga identifier ng time zone",
|
|
27
|
+
"docs": "I-print ang URL ng dokumentasyon ng API",
|
|
28
|
+
"config": "Basahin o i-update ang CLI konfigurasyon"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/locales/fr.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Heure actuelle et conversion de fuseau horaire IANA depuis votre terminal",
|
|
3
|
+
"usage": "Utilisation",
|
|
4
|
+
"global_options": "Options globales",
|
|
5
|
+
"environment": "Environnement",
|
|
6
|
+
"override_api_origin": "Remplacer l'origine de l'API",
|
|
7
|
+
"print_raw_json": "Afficher JSON brut",
|
|
8
|
+
"select_locale": "Sélectionner la langue de l'interface",
|
|
9
|
+
"show_help": "Afficher cette aide",
|
|
10
|
+
"show_version": "Afficher la version",
|
|
11
|
+
"api_origin_default": "Origine de l'API (par défaut : {base_url})",
|
|
12
|
+
"alternate_config": "Fichier de configuration alternatif",
|
|
13
|
+
"locale_environment": "Interface locale (par défaut : en)",
|
|
14
|
+
"option_requires_value": "{option} nécessite une valeur",
|
|
15
|
+
"saved": "{value} enregistré dans {filename}",
|
|
16
|
+
"reset": "{filename} réinitialisé",
|
|
17
|
+
"config_requires_url": "config set-base-url nécessite une URL",
|
|
18
|
+
"config_requires_action": "config nécessite get, set-base-url ou reset",
|
|
19
|
+
"unexpected_argument": "argument inattendu : {argument}",
|
|
20
|
+
"convert_requires": "convert nécessite <datetime> --from <timezone> --to <timezone>",
|
|
21
|
+
"unknown_command": "commande inconnue : {command}. Exécutez timeint2 --help",
|
|
22
|
+
"unknown_locale": "locale inconnue : {locale}. Exécutez timeint2 --help",
|
|
23
|
+
"commands": {
|
|
24
|
+
"time": "Afficher l'heure actuelle dans un fuseau horaire IANA",
|
|
25
|
+
"convert": "Convertir une date-heure ISO 8601 entre des fuseaux horaires IANA",
|
|
26
|
+
"timezones": "Rechercher des identifiants de fuseau horaire IANA",
|
|
27
|
+
"docs": "Imprimer l'URL de la documentation de l'API",
|
|
28
|
+
"config": "Lire ou mettre à jour la configuration CLI"
|
|
29
|
+
}
|
|
30
|
+
}
|