Merge pull request 'ga_IE Localisation, other localisation touchups' (#2) from Catster/campfire:design-v2 into design-v2
Reviewed-on: https://codeberg.org/arimelody/campfire/pulls/2
This commit is contained in:
		
						commit
						8e9fb6598e
					
				
					 6 changed files with 178 additions and 15 deletions
				
			
		|  | @ -13,7 +13,7 @@ | ||||||
|         "experimental": "Please note this is\n<strong><em>extremely experimental software</em></strong>;\nthings are likely to break!\n<br>\nIf that's all cool with you, welcome aboard!", |         "experimental": "Please note this is\n<strong><em>extremely experimental software</em></strong>;\nthings are likely to break!\n<br>\nIf that's all cool with you, welcome aboard!", | ||||||
|         "button": "Log in", |         "button": "Log in", | ||||||
|         "error": { |         "error": { | ||||||
|             "no_domain": "Please enter an server domain.", |             "no_domain": "Please enter a server domain.", | ||||||
|             "connection_failed": "Failed to connect to the server.\nCheck the browser console for details!", |             "connection_failed": "Failed to connect to the server.\nCheck the browser console for details!", | ||||||
|             "create_app": "Failed to create an application for this server." |             "create_app": "Failed to create an application for this server." | ||||||
|         }, |         }, | ||||||
|  | @ -57,7 +57,7 @@ | ||||||
|         "follow": "%1 followed you.", |         "follow": "%1 followed you.", | ||||||
|         "follow_request": "%1 requested to follow you.", |         "follow_request": "%1 requested to follow you.", | ||||||
|         "favourite": "%1 favourited your post.", |         "favourite": "%1 favourited your post.", | ||||||
|         "poll": "%1's poll as ended.", |         "poll": "%1's poll has ended.", | ||||||
|         "update": "%1 updated their post.", |         "update": "%1 updated their post.", | ||||||
|         "default": "%1 poked you!", |         "default": "%1 poked you!", | ||||||
|         "fetching": "fetching notifications..." |         "fetching": "fetching notifications..." | ||||||
|  | @ -67,7 +67,6 @@ | ||||||
|         "loading": "loading post...", |         "loading": "loading post...", | ||||||
|         "pinned": "📌 Pinned post", |         "pinned": "📌 Pinned post", | ||||||
|         "by": "Post by %1", |         "by": "Post by %1", | ||||||
|         "time": "%1 ago", |  | ||||||
|         "boosted": "%1 boosted this post.", |         "boosted": "%1 boosted this post.", | ||||||
|         "actions": { |         "actions": { | ||||||
|             "reply": "Reply", |             "reply": "Reply", | ||||||
|  | @ -79,12 +78,14 @@ | ||||||
|             "delete": "Delete" |             "delete": "Delete" | ||||||
|         }, |         }, | ||||||
|         "warning": { |         "warning": { | ||||||
|  |             "placeholder": "Content warning", | ||||||
|             "show": "(click to reveal)", |             "show": "(click to reveal)", | ||||||
|             "hide": "(click to hide)" |             "hide": "(click to hide)" | ||||||
|         }, |         }, | ||||||
|         "visibility": { |         "visibility": { | ||||||
|             "public": "public", |             "public": "public", | ||||||
|             "unlisted": "unlisted", |             "unlisted": "unlisted", | ||||||
|  |             "follow_only": "followers only", | ||||||
|             "private": "private", |             "private": "private", | ||||||
|             "direct": "direct" |             "direct": "direct" | ||||||
|         } |         } | ||||||
|  | @ -130,6 +131,17 @@ | ||||||
|         "post_fetch_failed": "Failed to retrieve post <code>%1</code>." |         "post_fetch_failed": "Failed to retrieve post <code>%1</code>." | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|  |     "time": { | ||||||
|  |         "in": "in %1", | ||||||
|  |         "ago": "%1 ago", | ||||||
|  |         "second": "s", | ||||||
|  |         "minute": "m", | ||||||
|  |         "hour": "h", | ||||||
|  |         "day": "d", | ||||||
|  |         "week": "w", | ||||||
|  |         "year": "y" | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|     "compose": "Post", |     "compose": "Post", | ||||||
|     "search": "Search", |     "search": "Search", | ||||||
|     "loading": "just a moment...", |     "loading": "just a moment...", | ||||||
|  |  | ||||||
							
								
								
									
										145
									
								
								src/lang/ga_IE.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								src/lang/ga_IE.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,145 @@ | ||||||
|  | { | ||||||
|  |     "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\n<strong><em>bogearraí thar a bheith turgnamhach</em> iad seo</strong>;\nis dócha go mbrisfidh rudaí!\n<br>\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 <a href=\"https://bliss.town\">bliss town</a>" | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     "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 <strong>%1</strong> 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 <code>%1</code>.", | ||||||
|  |         "post_fetch_failed": "Theip ar aisghabháil an phoist <code>%1</code>." | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     "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" | ||||||
|  | } | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| import * as en_GB from '@cf/lang/en_GB.json'; | 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) |  * @param {string} lang IETH language tag (i.e. en_GB) | ||||||
|  | @ -36,7 +37,7 @@ export default function init(lang) { | ||||||
|             i++; |             i++; | ||||||
|             token = tokens[i]; |             token = tokens[i]; | ||||||
|         } |         } | ||||||
| 
 |          | ||||||
|         i = 1; |         i = 1; | ||||||
|         while (true) { |         while (true) { | ||||||
|             if (args.length < i || !res.includes('%' + i)) |             if (args.length < i || !res.includes('%' + i)) | ||||||
|  |  | ||||||
|  | @ -2,12 +2,12 @@ import Lang from '$lib/lang'; | ||||||
| const lang = Lang('en_GB'); | const lang = Lang('en_GB'); | ||||||
| 
 | 
 | ||||||
| const denoms = [ | const denoms = [ | ||||||
|     { unit: 's', min: 0 }, |     { unit: lang.string('time.second'), min: 0 }, | ||||||
|     { unit: 'm', min: 60 }, |     { unit: lang.string('time.minute'), min: 60 }, | ||||||
|     { unit: 'h', min: 60 }, |     { unit: lang.string('time.hour'), min: 60 }, | ||||||
|     { unit: 'd', min: 24 }, |     { unit: lang.string('time.day'), min: 24 }, | ||||||
|     { unit: 'w', min: 7 }, |     { unit: lang.string('time.week'), min: 7 }, | ||||||
|     { unit: 'y', min: 52 }, |     { unit: lang.string('time.year'), min: 52 }, | ||||||
| ]; | ]; | ||||||
| 
 | 
 | ||||||
| export function shorthand(date) { | export function shorthand(date) { | ||||||
|  | @ -21,6 +21,6 @@ export function shorthand(date) { | ||||||
|         unit = denoms[index].unit; |         unit = denoms[index].unit; | ||||||
|     } |     } | ||||||
|     if (value > 0) |     if (value > 0) | ||||||
|         return lang.string('post.time', Math.floor(value) + unit); |         return lang.string('time.ago').replaceAll('%1', Math.floor(value) + unit); | ||||||
|     return "in " + Math.floor(value) + unit; |     return lang.string('time.in').replaceAll('%1', Math.floor(value) + unit); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -29,6 +29,7 @@ | ||||||
|     // let media_ids = []; |     // let media_ids = []; | ||||||
|     let show_cw = false; |     let show_cw = false; | ||||||
|     let visibility = "Public"; |     let visibility = "Public"; | ||||||
|  |     let visibilityLocale = lang.string('post.visibility.public'); | ||||||
| 
 | 
 | ||||||
|     const placeholders = lang.stringArray('compose_placeholders'); |     const placeholders = lang.stringArray('compose_placeholders'); | ||||||
|     let placeholder = Array.isArray(placeholders) ? placeholders[Math.floor(placeholders.length * Math.random())] |     let placeholder = Array.isArray(placeholders) ? placeholders[Math.floor(placeholders.length * Math.random())] | ||||||
|  | @ -74,15 +75,19 @@ | ||||||
|         switch (visibility) { |         switch (visibility) { | ||||||
|             case "Public": |             case "Public": | ||||||
|                 visibility = "Unlisted"; |                 visibility = "Unlisted"; | ||||||
|  |                 visibilityLocale = lang.string('post.visibility.unlisted'); | ||||||
|                 break; |                 break; | ||||||
|             case "Unlisted": |             case "Unlisted": | ||||||
|                 visibility = "Followers only"; |                 visibility = "Followers only"; | ||||||
|  |                 visibilityLocale = lang.string('post.visibility.follow_only'); | ||||||
|                 break; |                 break; | ||||||
|             case "Followers only": |             case "Followers only": | ||||||
|                 visibility = "Private"; |                 visibility = "Private"; | ||||||
|  |                 visibilityLocale = lang.string('post.visibility.private'); | ||||||
|                 break; |                 break; | ||||||
|             case "Private": |             case "Private": | ||||||
|                 visibility = "Public"; |                 visibility = "Public"; | ||||||
|  |                 visibilityLocale = lang.string('post.visibility.public'); | ||||||
|                 break; |                 break; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | @ -102,7 +107,7 @@ | ||||||
|             <div class="composer-info" on:mouseup|stopPropagation> |             <div class="composer-info" on:mouseup|stopPropagation> | ||||||
|             </div> |             </div> | ||||||
|         </header> |         </header> | ||||||
|         <div title={visibility}> |         <div title={visibilityLocale}> | ||||||
|             <Button centered={true} on:click={() => {cycleVisibility()}}> |             <Button centered={true} on:click={() => {cycleVisibility()}}> | ||||||
|                 <svelte:fragment slot="icon"> |                 <svelte:fragment slot="icon"> | ||||||
|                     <!-- TODO: this should be a drop-down option!...later --> |                     <!-- TODO: this should be a drop-down option!...later --> | ||||||
|  | @ -120,7 +125,7 @@ | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|     {#if show_cw} |     {#if show_cw} | ||||||
|         <input type="text" id="" placeholder="Content warning" bind:value={content_warning}/> |         <input type="text" id="" placeholder="{lang.string('post.warning.placeholder')}" bind:value={content_warning}/> | ||||||
|     {/if} |     {/if} | ||||||
|     <textarea placeholder="{placeholder}" class="textbox" bind:value={content}></textarea> |     <textarea placeholder="{placeholder}" class="textbox" bind:value={content}></textarea> | ||||||
|     <div class="composer-footer"> |     <div class="composer-footer"> | ||||||
|  |  | ||||||
|  | @ -24,7 +24,7 @@ | ||||||
|     <span class="post-context-time"> |     <span class="post-context-time"> | ||||||
|         <time title="{time_string}">{short_time(post.created_at)}</time> |         <time title="{time_string}">{short_time(post.created_at)}</time> | ||||||
|         {#if post.visibility !== "public"} |         {#if post.visibility !== "public"} | ||||||
|             <span class="post-visibility">- {post.visibility}</span> |             <span class="post-visibility">- {lang.string(`post.visibility.${post.visibility}`)}</span> | ||||||
|         {/if} |         {/if} | ||||||
|     </span> |     </span> | ||||||
| </div> | </div> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 ari melody
						ari melody