diff --git a/src/lang/en_GB.json b/src/lang/en_GB.json index bc63a74..52db85b 100644 --- a/src/lang/en_GB.json +++ b/src/lang/en_GB.json @@ -13,7 +13,7 @@ "experimental": "Please note this is\nextremely experimental software;\nthings are likely to break!\n
\nIf that's all cool with you, welcome aboard!", "button": "Log in", "error": { - "no_domain": "Please enter a server domain.", + "no_domain": "Please enter an server domain.", "connection_failed": "Failed to connect to the server.\nCheck the browser console for details!", "create_app": "Failed to create an application for this server." }, @@ -57,7 +57,7 @@ "follow": "%1 followed you.", "follow_request": "%1 requested to follow you.", "favourite": "%1 favourited your post.", - "poll": "%1's poll has ended.", + "poll": "%1's poll as ended.", "update": "%1 updated their post.", "default": "%1 poked you!", "fetching": "fetching notifications..." @@ -67,6 +67,7 @@ "loading": "loading post...", "pinned": "📌 Pinned post", "by": "Post by %1", + "time": "%1 ago", "boosted": "%1 boosted this post.", "actions": { "reply": "Reply", @@ -78,14 +79,12 @@ "delete": "Delete" }, "warning": { - "placeholder": "Content warning", "show": "(click to reveal)", "hide": "(click to hide)" }, "visibility": { "public": "public", "unlisted": "unlisted", - "follow_only": "followers only", "private": "private", "direct": "direct" } @@ -131,17 +130,6 @@ "post_fetch_failed": "Failed to retrieve post %1." }, - "time": { - "in": "in %1", - "ago": "%1 ago", - "second": "s", - "minute": "m", - "hour": "h", - "day": "d", - "week": "w", - "year": "y" - }, - "compose": "Post", "search": "Search", "loading": "just a moment...", diff --git a/src/lang/ga_IE.json b/src/lang/ga_IE.json deleted file mode 100644 index 93827df..0000000 --- a/src/lang/ga_IE.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "compose_placeholders": [ - "Céard atá ar bun, %1?", - "Abair do thuairim!", - "Cónaidhmigh rud éigin...", - "Is breá liom postáil cinnte!", - "Lá eile, postáil %1 eile!" - ], - - "login": { - "welcome": "Fáilte, a úsáideoir fediverse!", - "enter_domain": "Cuir isteach fearann do fhreastalaí le logáil isteach.", - "experimental": "Tabhair faoi deara gur\nbogearraí thar a bheith turgnamhach iad seo;\nis dócha go mbrisfidh rudaí!\n
\nMás ceart go leor leat é sin, fáilte romhat!", - "button": "Logáil isteach", - "error": { - "no_domain": "Cuir isteach fearann freastalaí.", - "connection_failed": "Theip ar cheangal leis an bhfreastalaí.\nSeiceáil consól an bhrabhsálaí le haghaidh sonraí!", - "create_app": "Theip ar fheidhmchlár a chruthú don fhreastalaí seo." - }, - "made_with_tagline": "déanta le ❤ ag bliss town" - }, - - "navigation": { - "timeline": "Amlíne", - "notifications": "Fógraí", - "explore": "Féach Thart", - "lists": "Liostaí", - - "favourites": "Ceanáin", - "bookmarks": "Leabharmharcanna", - "hashtags": "Haischlibeanna", - - "profile_information": "Faisnéis Phróifíle", - "settings": "Socruithe", - "log_out": "Logáil amach", - - "back": "Fill" - }, - - "timeline": { - "home": "Baile", - "local": "Áitiúil", - "federated": "Cónaidhmithe", - "fetching": "ag fáil an fhotha..." - }, - - "notification": { - "and_others": "agus %1 eile", - "mention": "Luaigh %1 thú.", - "reblog": "Chuir %1 borradh faoi do phost", - "reaction": "D'fhrithghníomhaigh %1 do do phost", - "follow": "Lean %1 thú", - "follow_request": "D'iarr %1 leanúint leat.", - "favourite": "Chuir %1 do phost i bhfabhar.", - "poll": "Chríochnaigh pobalbhreith %1.", - "update": "Nuashonraigh %1 a bpost", - "default": "Priocadh %1 thú!", - "fetching": "ag fáil an fógraí..." - }, - - "post": { - "loading": "ag lódáil an postáil...", - "by": "Postáil le %1", - "boosted": "Chuir %1 borradh faoin bpost seo.", - "actions": { - "reply": "Freagair", - "boost": "Borradh", - "favourite": "Ceanán", - "quote": "Sliocht", - "react": "Frithghníomhaigh", - "more": "Tuilleadh", - "delete": "Scrios" - }, - "warning": { - "placeholder": "Rabhadh ábhair", - "show": "(cliceáil chun nochtadh)", - "hide": "(cliceáil chun a cheilt)" - }, - "visibility": { - "public": "poiblí", - "unlisted": "neamhliostaithe", - "follow_only": "leantóirí amháin", - "private": "príobháideach", - "direct": "díreach" - } - }, - - "profile": { - "locked": "Is cuntas príobháideach é seo.", - "bot": "Is cuntas uathoibrithe é seo.", - "followers": "Leantóirí", - "following": "Ag leanúint", - "follow": "Lean", - "home_instance": "Féach ar ásc baile", - "more": "Tuilleadh", - "posts": "Poist", - "replies": "Freagraí", - "media": "Meáin", - "loading": "ag lódáil an próifíl..." - }, - - "logs": { - "logged_in": "Logáilte isteach mar %1", - "server_detected": "Freastalaí braite mar %1 (%2) le cumais: {%3}}", - "server_unsupported": "Ní thacaítear le freastalaí %1 (%2). D'fhéadfadh rudaí briseadh, nó gan oibriú mar a bhíothas ag súil leis.", - "no_hostname": "Rinneadh iarracht ceangal le freastalaí gan ainm óstach a sholáthar", - "no_https": "Diúltaíodh ceangal leis an bhfreastalaí neamhshábháilte cosúil le cladhaire", - "connection_failed": "Theip ar cheangal le %1", - "post_fetch_failed": "Theip ar an bpost a fháil", - "post_fetch_failed_id": "Theip ar an bpost %1 a fháil", - "post_parse_failed": "Theip ar an bpost a pharsáil", - "post_parse_failed_id": "Theip ar an bpost %1 a pharsáil", - "profile_fetch_failed": "Theip ar phróifíl a fháil", - "profile_fetch_failed_id": "Theip ar phróifíl a fháil %1", - "token_revoke_failed": "Theip ar chúlghairm an chomhartha! Ag dumpáil sonraí ar aon nós", - "sound_does_not_exist": "Rinneadh iarracht fuaim \"%1\" a sheinm, ach níl sé ann!", - "account_data_empty": "Rinneadh iarracht sonraí cuntais a pharsáil ach níor soláthraíodh aon sonraí", - "timeline_fetch_failed": "Theip ar an amlíne a aisghabháil." - }, - - "error": { - "bad_request": "Droch-iarratas", - "invalid_auth_code": "Cód údaraithe neamhbhailí curtha ar fáil", - "connection_failed": "Theip ar cheangal le %1.", - "post_fetch_failed": "Theip ar aisghabháil an phoist %1." - }, - - "time": { - "in": "i gceann %1", - "ago": "%1 ó shin", - "second": "so", - "minute": "no", - "hour": "ua", - "day": "lá", - "week": "se", - "year": "bl" - }, - - "compose": "Cruthaigh", - "search": "Cuardaigh", - "loading": "fan nóiméad...", - - "source": "foinse", - "issues": "saincheisteanna" -} diff --git a/src/lib/lang.js b/src/lib/lang.js index 66e70cc..955a749 100644 --- a/src/lib/lang.js +++ b/src/lib/lang.js @@ -1,5 +1,4 @@ import * as en_GB from '@cf/lang/en_GB.json'; -import * as ga_IE from '@cf/lang/ga_IE.json'; /** * @param {string} lang IETH language tag (i.e. en_GB) @@ -37,7 +36,7 @@ export default function init(lang) { i++; token = tokens[i]; } - + i = 1; while (true) { if (args.length < i || !res.includes('%' + i)) diff --git a/src/lib/time.js b/src/lib/time.js index 9accb8a..99811bf 100644 --- a/src/lib/time.js +++ b/src/lib/time.js @@ -2,12 +2,12 @@ import Lang from '$lib/lang'; const lang = Lang('en_GB'); const denoms = [ - { unit: lang.string('time.second'), min: 0 }, - { unit: lang.string('time.minute'), min: 60 }, - { unit: lang.string('time.hour'), min: 60 }, - { unit: lang.string('time.day'), min: 24 }, - { unit: lang.string('time.week'), min: 7 }, - { unit: lang.string('time.year'), min: 52 }, + { unit: 's', min: 0 }, + { unit: 'm', min: 60 }, + { unit: 'h', min: 60 }, + { unit: 'd', min: 24 }, + { unit: 'w', min: 7 }, + { unit: 'y', min: 52 }, ]; export function shorthand(date) { @@ -21,6 +21,6 @@ export function shorthand(date) { unit = denoms[index].unit; } if (value > 0) - return lang.string('time.ago').replaceAll('%1', Math.floor(value) + unit); - return lang.string('time.in').replaceAll('%1', Math.floor(value) + unit); + return lang.string('post.time', Math.floor(value) + unit); + return "in " + Math.floor(value) + unit; } diff --git a/src/lib/ui/Composer.svelte b/src/lib/ui/Composer.svelte index 0317ce2..f2664fa 100644 --- a/src/lib/ui/Composer.svelte +++ b/src/lib/ui/Composer.svelte @@ -29,7 +29,6 @@ // let media_ids = []; let show_cw = false; let visibility = "Public"; - let visibilityLocale = lang.string('post.visibility.public'); const placeholders = lang.stringArray('compose_placeholders'); let placeholder = Array.isArray(placeholders) ? placeholders[Math.floor(placeholders.length * Math.random())] @@ -75,19 +74,15 @@ switch (visibility) { case "Public": visibility = "Unlisted"; - visibilityLocale = lang.string('post.visibility.unlisted'); break; case "Unlisted": visibility = "Followers only"; - visibilityLocale = lang.string('post.visibility.follow_only'); break; case "Followers only": visibility = "Private"; - visibilityLocale = lang.string('post.visibility.private'); break; case "Private": visibility = "Public"; - visibilityLocale = lang.string('post.visibility.public'); break; } } @@ -107,7 +102,7 @@
-
+
{#if show_cw} - + {/if}