]> Untitled Git - lemmy.git/blob - ui/src/i18next.ts
i18n translations first pass.
[lemmy.git] / ui / src / i18next.ts
1 import * as i18n from 'i18next';
2
3 // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
4 //
5 // TODO don't forget to add moment locales for new languages.
6 const resources = {
7         en: {
8                 translation: {
9       post: 'post',
10       edit: 'edit',
11       reply: 'reply',
12       cancel: 'Cancel',
13       unlock: 'unlock',
14       lock: 'lock',
15       link: 'link',
16       mod: 'mod',
17       mods: 'mods',
18       moderates: 'Moderates',
19       admin: 'admin',
20       admins: 'admins',
21       modlog: 'Modlog',
22       remove: 'remove',
23       removed: 'removed',
24       locked: 'locked',
25       reason: 'Reason',
26       remove_as_mod: 'remove as mod',
27       appoint_as_mod: 'appoint as mod',
28       remove_as_admin: 'remove as admin',
29       appoint_as_admin: 'appoint as admin',
30       mark_as_read: 'mark as read',
31       mark_as_unread: 'mark as unread',
32       remove_comment: 'Remove Comment',
33       remove_community: 'Remove Community',
34       delete: 'delete',
35       deleted: 'deleted',
36       restore: 'restore',
37       ban: 'ban',
38       unban: 'unban',
39       ban_from_site: 'ban from site',
40       unban_from_site: 'unban from site',
41       save: 'save',
42       unsave: 'unsave',
43       create: 'create',
44       subscribed_to_communities:'Subscribed to <1>communities</1>',
45       create_a_community: 'Create a community',
46       create_community: 'Create Community',
47       create_a_post: 'Create a post',
48       create_post: 'Create Post',
49       trending_communities:'Trending <1>communities</1>',
50       number_of_users:'{{count}} Users',
51       number_of_subscribers:'{{count}} Subscribers',
52       number_of_posts:'{{count}} Posts',
53       number_of_comments:'{{count}} Comments',
54       number_of_points:'{{count}} Points',
55       powered_by: 'Powered by',
56       landing_0: 'Lemmy is a <1>link aggregator</1> / reddit alternative, intended to work in the <2>fediverse</2>.<3></3>Its self-hostable, has live-updating comment threads, and is tiny (<4>~80kB</4>). Federation into the ActivityPub network is on the roadmap. <5></5>This is a <6>very early beta version</6>, and a lot of features are currently broken or missing. <7></7>Suggest new features or report bugs <8>here.</8><9></9>Made with <10>Rust</10>, <11>Actix</11>, <12>Inferno</12>, <13>Typescript</13>.',
57       list_of_communities: 'List of communities',
58       name: 'Name',
59       title: 'Title',
60       category: 'Category',
61       subscribers: 'Subscribers',
62       both: 'Both',
63       posts: 'Posts',
64       comments: 'Comments',
65       saved: 'Saved',
66       unsubscribe: 'Unsubscribe',
67       subscribe: 'Subscribe',
68       prev: 'Prev',
69       next: 'Next',
70       sidebar: 'Sidebar',
71       community_reqs: 'lowercase, underscores, and no spaces.',
72       sort_type: 'Sort type',
73       hot: 'Hot',
74       new: 'New',
75       top_day: 'Top day',
76       week: 'Week',
77       month: 'Month',
78       year: 'Year',
79       all: 'All',
80       top: 'Top',
81       
82       api: 'API',
83       sponsors: 'Sponsors',
84       sponsors_of_lemmy: 'Sponsors of Lemmy',
85       sponsor_message: 'Lemmy is free, <1>open-source</1> software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project. Thank you to the following people:',
86       support_on_patreon: 'Support on Patreon',
87       general_sponsors:'General Sponsors are those that pledged $10 to $39 to Lemmy.',
88       bitcoin: 'Bitcoin',
89       ethereum: 'Ethereum',
90       code: 'Code',
91
92       inbox: 'Inbox',
93       inbox_for: 'Inbox for <1>{{user}}</1>',
94       mark_all_as_read: 'mark all as read',
95       type: 'Type',
96       unread: 'Unread',
97       reply_sent: 'Reply sent',
98       
99       communities: 'Communities',
100       search: 'Search',
101       overview: 'Overview',
102       view: 'View',
103       logout: 'Logout',
104       login_sign_up: 'Login / Sign up',
105       notifications_error: 'Desktop notifications not available in your browser. Try Firefox or Chrome.',
106       unread_messages: 'Unread Messages',
107
108       email_or_username: 'Email or Username',
109       password: 'Password',
110       verify_password: 'Verify Password',
111       login: 'Login',
112       sign_up: 'Sign Up',
113       username: 'Username',
114       email: 'Email',
115       optional: 'Optional',
116
117       url: 'URL',
118       body: 'Body',
119       copy_suggested_title: 'copy suggested title: {{title}}',
120       related_posts: 'These posts might be related',
121       community: 'Community',
122
123       expand_here: 'Expand here',
124       remove_post: 'Remove Post',
125
126       no_posts: 'No Posts.',
127       subscribe_to_communities: 'Subscribe to some <1>communities</1>.',
128
129       chat: 'Chat',
130
131       no_results: 'No results.',
132       
133       setup: 'Setup',
134       lemmy_instance_setup: 'Lemmy Instance Setup',
135       setup_admin: 'Set Up Site Administrator',
136
137       your_site: 'your site',
138       modified: 'modified',
139
140
141       foo: 'foo',
142                         bar: '<1>bar</1>',
143                         baz: '<1>{{count}}</1>',
144                         qux: 'qux<1></1>',
145                         qux_plural: 'quxes<1></1>',
146                         quux: '<1>{{name, uppercase}}</1>',
147                         userMessagesUnread: 'Hello <1>{{name}}</1>, you have {{count}} unread messages. <3>Go to messages</3>.',
148                         userMessagesUnread_plural: 'Hello <1>{{name}}</1>, you have {{count}} unread messages. <3>Go to messages</3>.'
149                 },
150         },
151 };
152
153 function format(value: any, format: any, lng: any) {
154         if (format === 'uppercase') return value.toUpperCase();
155         return value;
156 }
157
158 i18n
159 .init({
160   fallbackLng: 'en',
161         resources,
162         interpolation: {
163                 format: format
164         }
165 });
166
167 export { i18n, resources };