rin
Public Open-source lightweight git hosting.
i18n.go · 1021 lines · 58.0 KB
Raw
1 package i18n
2
3 type Lang string
4
5 const (
6 RU Lang = "ru"
7 EN Lang = "en"
8 )
9
10 func Normalize(code string) Lang {
11 switch code {
12 case "en", "EN":
13 return EN
14 default:
15 return RU
16 }
17 }
18
19 var translations = map[Lang]map[string]string{
20 RU: {
21 // Навигация и общее
22 "app.tagline": "Лёгкий self-hosted Git-хостинг",
23 "nav.home": "Главная",
24 "nav.repositories": "Репозитории",
25 "nav.explore": "Обзор",
26 "nav.settings": "Настройки",
27 "nav.admin": "Админка",
28 "nav.login": "Войти",
29 "nav.register": "Регистрация",
30 "nav.logout": "Выйти",
31 "nav.new_repo": "Создать",
32 "nav.command_palette": "Поиск и команды",
33 "nav.search_placeholder": "Поиск...",
34 "nav.theme": "Тема",
35 "nav.lang": "Язык",
36 "common.copy": "Копировать",
37 "common.copied": "Скопировано",
38 "common.cancel": "Отмена",
39 "common.save": "Сохранить",
40 "common.delete": "Удалить",
41 "common.close": "Закрыть",
42 "common.never": "Никогда",
43 "common.newer": "Новее",
44 "common.older": "Старее",
45 "common.up": "Наверх",
46
47 // Темы (только 3)
48 "theme.light": "Светлая",
49 "theme.dark": "Тёмная",
50 "theme.system": "Авто",
51
52 // Лендинг
53 "landing.badge": "Один бинарник · SQLite · Ноль зависимостей",
54 "landing.hero.title": "Лёгкий self-hosted Git-хостинг",
55 "landing.hero.subtitle": "Один бинарник на Go со встроенным SQLite. Поднимается за минуту, потребляет минимум памяти и не перегружен лишним.",
56 "landing.hero.cta_start": "Начать",
57 "landing.features.title": "Принципы",
58 "landing.feat1.title": "Один бинарник",
59 "landing.feat1.desc": "Шаблоны, стили, шрифты, миграции и иконки вшиты через go:embed.",
60 "landing.feat2.title": "SQLite (WAL)",
61 "landing.feat2.desc": "Вся база — один файл data/polar.db без CGO. Бэкап простым копированием.",
62 "landing.feat3.title": "Быстрый отклик",
63 "landing.feat3.desc": "Мгновенный старт, серверный рендеринг и < 30 МБ памяти в простое.",
64 "landing.feat4.title": "Приватность",
65 "landing.feat4.desc": "Публичные и приватные репозитории, Argon2id и токены доступа для Git HTTP.",
66 // Авторизация
67 "auth.login.title": "Вход",
68 "auth.register.title": "Регистрация",
69 "auth.register.disabled": "Публичная регистрация отключена администратором.",
70 "auth.username": "Имя пользователя",
71 "auth.username_hint": "2–32 символа: латиница, цифры, дефис, подчёркивание",
72 "auth.username_or_email": "Логин или Email",
73 "auth.email": "Email",
74 "auth.password": "Пароль",
75 "auth.password_hint": "Минимум 8 символов",
76 "auth.submit_login": "Войти",
77 "auth.submit_register": "Создать аккаунт",
78 "auth.no_account": "Нет аккаунта?",
79 "auth.have_account": "Уже есть аккаунт?",
80 "auth.invalid_creds": "Неверный логин или пароль",
81
82 // Репозитории
83 "repo.new.title": "Новый репозиторий",
84 "repo.name": "Название",
85 "repo.name_hint": "Латинские буквы, цифры, точка, дефис, подчёркивание",
86 "repo.description": "Описание",
87 "repo.description_ph": "Краткое описание проекта (необязательно)",
88 "repo.visibility": "Доступ",
89 "repo.public": "Публичный",
90 "repo.public_desc": "Виден всем, клонирование без авторизации",
91 "repo.private": "Приватный",
92 "repo.private_desc": "Доступен только владельцу",
93 "repo.create_btn": "Создать репозиторий",
94 "repo.filter_ph": "Фильтр репозиториев...",
95 "repo.empty_list": "Репозиториев пока нет",
96 "repo.empty_list_sub": "Создайте первый репозиторий, чтобы отправить код.",
97 "repo.empty.title": "Репозиторий пуст",
98 "repo.empty.new_cmd": "Создать новый репозиторий в командной строке",
99 "repo.empty.push_cmd": "Отправить существующий репозиторий",
100 "repo.tab.code": "Код",
101 "repo.tab.commits": "Коммиты",
102 "repo.tab.branches": "Ветки и теги",
103 "repo.tab.issues": "Задачи",
104 "repo.tab.pulls": "Пул-реквесты",
105 "repo.tab.releases": "Релизы",
106 "repo.tab.activity": "Активность",
107 "repo.tab.settings": "Настройки",
108 "repo.features": "Возможности репозитория",
109 "repo.clone": "Клонировать",
110 "repo.download_zip": "Скачать ZIP",
111 "repo.branches": "Ветки",
112 "repo.tags": "Теги",
113 "repo.default_branch": "Ветка по умолчанию",
114 "repo.find_file": "Поиск файла...",
115 "repo.files": "Файлы",
116 "repo.readme": "README",
117 "repo.raw": "Raw",
118 "repo.history": "История",
119 "repo.lines": "строк",
120 "repo.lines_one": "строка",
121 "repo.lines_few": "строки",
122 "repo.lines_many": "строк",
123 "repo.binary_notice": "Бинарный файл — предпросмотр недоступен",
124 "repo.download_raw": "Скачать файл",
125 "repo.browse_at_commit": "Файлы на момент коммита",
126 "repo.files_changed": "файлов изменено",
127 "repo.files_changed_one": "файл изменён",
128 "repo.files_changed_few": "файла изменено",
129 "repo.files_changed_many": "файлов изменено",
130 "repo.no_commits": "Коммитов пока нет",
131 "repo.danger_zone": "Опасная зона",
132 "repo.delete": "Удалить репозиторий",
133 "repo.delete_desc": "Удаление необратимо: все файлы и история git будут стёрты.",
134 "repo.delete_confirm": "Введите название репозитория для подтверждения",
135 "repo.rename": "Переименовать",
136 "repo.save": "Сохранить",
137 "repo.branch.new": "Новая ветка",
138 "repo.branch.name_ph": "Имя ветки (напр. feat/ui)",
139 "repo.branch.from": "От ветки / коммита",
140 "repo.branch.create": "Создать ветку",
141 "repo.branch.default": "по умолчанию",
142 "repo.tag.new": "Новый тег / релиз",
143 "repo.tag.name_ph": "Тег (напр. v1.0.0)",
144 "repo.tag.msg_ph": "Описание тега (необязательно)",
145 "repo.tag.create": "Создать тег",
146 "repo.tags.empty": "Тегов пока нет",
147
148 // Pull Requests
149 "pulls.title": "Пул-реквесты",
150 "pulls.new": "Новый пул-реквест",
151 "pulls.empty": "Пул-реквестов пока нет",
152 "pulls.open": "Открыт",
153 "pulls.closed": "Закрыт",
154 "pulls.merged": "Слит",
155 "pulls.compare": "Сравнение веток",
156 "pulls.base": "Базовая ветка",
157 "pulls.head": "Ветка изменений",
158 "pulls.title_ph": "Заголовок пул-реквеста...",
159 "pulls.desc_ph": "Опишите предлагаемые изменения (Markdown)...",
160 "pulls.create_btn": "Создать пул-реквест",
161 "pulls.merge_btn": "Слить пул-реквест",
162 "pulls.can_merge": "Ветки можно объединить автоматически.",
163 "pulls.cannot_merge": "Невозможно объединить автоматически: обнаружены конфликты.",
164 "pulls.already_merged": "Ветка изменений уже объединена с базовой.",
165 "pulls.close_btn": "Закрыть PR",
166 "pulls.reopen_btn": "Открыть заново",
167 "pulls.comment_btn": "Прокомментировать",
168 "pulls.conversation": "Обсуждение",
169 "pulls.files_changed": "Изменения",
170 "pulls.commits": "Коммиты",
171 "pulls.able_to_merge": "Можно слить автоматически",
172 "pulls.body": "Описание",
173 "pulls.body_ph": "Опишите предлагаемые изменения (Markdown)...",
174 "pulls.branches_identical": "Ветки идентичны — сравнивать нечего",
175 "pulls.cannot_merge_warning": "Обнаружены конфликты — автоматическое слияние невозможно",
176 "pulls.closed_desc": "Ветка изменений не была объединена с базовой.",
177 "pulls.closed_message": "Пул-реквест закрыт",
178 "pulls.comment_ph": "Напишите комментарий (поддерживается Markdown)...",
179 "pulls.compare_branches": "Сравнение веток",
180 "pulls.conflicts_desc": "Разрешите конфликты локально и запушьте изменения в ветку.",
181 "pulls.conflicts_title": "Есть конфликты слияния",
182 "pulls.into": "в",
183 "pulls.merge_clean": "Конфликтов нет — изменения можно объединить.",
184 "pulls.merged_message": "Пул-реквест слит",
185 "pulls.no_changes": "Файлы не изменены",
186 "pulls.no_commits": "В этом пул-реквесте пока нет коммитов",
187 "pulls.only_write_merge": "Сливать пул-реквесты могут только пользователи с правом записи.",
188 "pulls.status.closed": "Закрыт",
189 "pulls.status.merged": "Слит",
190 "pulls.status.open": "Открыт",
191 "pulls.wants_to_merge": "хочет слить",
192
193 // Releases
194 "releases.title": "Релизы",
195 "releases.new": "Новый релиз",
196 "releases.empty": "Релизов пока нет",
197 "releases.tag_select": "Тег",
198 "releases.title_ph": "Название релиза",
199 "releases.desc_ph": "Описание релиза, список изменений (Markdown)...",
200 "releases.prerelease": "Пре-релиз (нестабильная сборка)",
201 "releases.publish": "Опубликовать релиз",
202 "releases.delete": "Удалить релиз",
203 "releases.assets": "Файлы",
204 "releases.source_zip": "Исходный код (zip)",
205 "releases.source_tar": "Исходный код (tar.gz)",
206 "releases.body": "Описание",
207 "releases.body_ph": "Опишите релиз, список изменений (Markdown)...",
208 "releases.count": "релизов",
209 "releases.count_one": "релиз",
210 "releases.count_few": "релиза",
211 "releases.count_many": "релизов",
212 "releases.delete_confirm": "Удалить этот релиз? Действие необратимо.",
213 "releases.is_prerelease": "Пре-релиз (нестабильная сборка)",
214 "releases.publish_btn": "Опубликовать релиз",
215 "releases.tag_desc": "Существующий тег или новый — он будет создан автоматически.",
216 "releases.tag_name": "Тег",
217 "releases.tags": "тегов",
218 "releases.tags_one": "тег",
219 "releases.tags_few": "тега",
220 "releases.tags_many": "тегов",
221 "releases.target": "Ветка",
222 "releases.target_desc": "Ветка или коммит, на который будет указывать тег.",
223
224 // Activity
225 "activity.title": "Активность",
226 "activity.pulse": "Сводка активности",
227 "activity.empty": "Активности пока нет",
228 "activity.commits": "коммитов",
229 "activity.open_prs": "открытых PR",
230 "activity.merged_prs": "слитых PR",
231 "activity.open_issues": "открытых задач",
232 "activity.releases": "релизов",
233 "activity.issues": "открыто и закрыто",
234 "activity.on_default_branch": "в ветке по умолчанию",
235 "activity.published_releases": "опубликованные релизы",
236 "activity.pull_requests": "открыто и слито",
237 "activity.recent_feed": "Лента активности",
238 "activity.badge_commit": "коммит",
239 "activity.badge_release": "релиз",
240
241 // Задачи (Issues)
242 "issue.new": "Новая задача",
243 "issue.title": "Заголовок",
244 "issue.title_ph": "Кратко опишите задачу или проблему",
245 "issue.body": "Описание",
246 "issue.body_ph": "Подробное описание (поддерживается Markdown)...",
247 "issue.create": "Создать задачу",
248 "issue.open": "Открытые",
249 "issue.closed": "Закрытые",
250 "issue.status.open": "Открыта",
251 "issue.status.closed": "Закрыта",
252 "issue.close_btn": "Закрыть задачу",
253 "issue.reopen_btn": "Переоткрыть",
254 "issue.comment_ph": "Напишите комментарий (поддерживается Markdown)...",
255 "issue.comment_btn": "Отправить",
256 "issue.empty": "Задач в этом списке нет",
257
258 // Настройки пользователя, профиль и токены
259 "settings.title": "Настройки",
260 "settings.profile": "Профиль",
261 "settings.avatar": "Аватар",
262 "settings.avatar_upload": "Выбрать изображение",
263 "settings.avatar_remove": "Удалить аватар",
264 "settings.avatar_hint": "PNG, JPG, WebP или GIF — автоматически кадрируется до 256×256",
265 "settings.full_name": "Отображаемое имя",
266 "settings.full_name_ph": "Ваше имя или ник",
267 "settings.bio": "О себе",
268 "settings.bio_ph": "Короткая подпись в профиле",
269 "settings.location": "Локация",
270 "settings.location_ph": "Город, страна",
271 "settings.website": "Сайт",
272 "settings.website_ph": "https://example.com",
273 "profile.edit": "Редактировать профиль",
274 "profile.joined": "Регистрация",
275 "profile.public_repos": "Публичные",
276 "profile.private_repos": "Приватные",
277 "profile.total_repos": "Репозитории",
278 "settings.tokens": "Токены доступа",
279 "settings.tokens.desc": "Используйте токен вместо пароля для git clone и git push по HTTP.",
280 "settings.token.name": "Название токена (например, Ноутбук)",
281 "settings.token.create": "Создать",
282 "settings.token.revoke": "Отозвать",
283 "settings.token.created_once": "Скопируйте токен сейчас — он показывается только один раз:",
284 "settings.token.col_name": "Название",
285 "settings.token.col_prefix": "Префикс",
286 "settings.token.col_created": "Создан",
287 "settings.token.col_used": "Использован",
288 "settings.token.empty": "Токенов доступа пока нет",
289 "settings.password.current": "Текущий пароль",
290 "settings.password.new": "Новый пароль",
291 "settings.password.update": "Обновить пароль",
292
293 // Админка
294 "admin.title": "Администрирование",
295 "admin.features": "Модули и доступ",
296 "admin.users": "Пользователи",
297 "admin.registration": "Публичная регистрация",
298 "admin.registration.desc": "Разрешить самостоятельную регистрацию новых аккаунтов",
299 "admin.explore": "Раздел «Обзор» (Explore)",
300 "admin.explore.desc": "Показывать каталог публичных репозиториев в сайдбаре и по адресу /explore",
301 "admin.landing": "Приветственная страница",
302 "admin.landing.desc": "Показывать лендинг на главной странице (если отключено — переход сразу к репозиториям или входу)",
303 "admin.anon_read": "Гостевой просмотр",
304 "admin.anon_read.desc": "Разрешить неавторизованным пользователям просматривать публичные репозитории и профили",
305 "admin.issues": "Трекер задач (Issues)",
306 "admin.issues.desc": "Включить вкладку «Задачи» в репозиториях",
307 "admin.enabled": "Включено",
308 "admin.disabled": "Отключено",
309 "admin.enable_btn": "Включить",
310 "admin.disable_btn": "Отключить",
311 "admin.col.user": "Пользователь",
312 "admin.col.repos": "Репозитории",
313 "admin.col.role": "Роль",
314 "admin.col.joined": "Дата",
315 "admin.role.admin": "Админ",
316 "admin.role.user": "Участник",
317
318 // Командная палитра и хоткеи
319 "palette.placeholder": "Поиск репозитория, файла или команды...",
320 "palette.group.nav": "Навигация",
321 "palette.group.themes": "Тема оформления",
322 "palette.group.repos": "Репозитории",
323 "shortcuts.title": "Горячие клавиши",
324 "shortcuts.palette": "Командная палитра",
325 "shortcuts.search": "Фокус на поиск",
326 "shortcuts.home": "На главную",
327 "shortcuts.repos": "Мои репозитории",
328 "shortcuts.files": "Фильтр файлов",
329 "shortcuts.sidebar": "Скрыть / показать сайдбар",
330 "nav.toggle_sidebar": "Сайдбар (Ctrl+B)",
331
332 // Флеш-сообщения
333 "flash.welcome": "Добро пожаловать в Polar, @%s!",
334 "flash.profile_updated": "Профиль обновлён.",
335 "flash.password_updated": "Пароль успешно изменён.",
336 "flash.token_revoked": "Токен доступа отозван.",
337 "flash.settings_updated": "Настройки сохранены.",
338 "flash.error": "Ошибка: %s",
339 "flash.comment_error": "Не удалось отправить комментарий: %s",
340 "flash.pr_created": "Пул-реквест #%d создан.",
341 "flash.pr_closed": "Пул-реквест #%d закрыт.",
342 "flash.pr_reopened": "Пул-реквест #%d открыт заново.",
343 "flash.pr_merged": "Пул-реквест #%d слит.",
344 "flash.pr_merged_state": "Нельзя изменить состояние слитого пул-реквеста.",
345 "flash.pr_merge_open_only": "Слить можно только открытый пул-реквест.",
346 "flash.pr_merge_failed": "Не удалось слить: %s",
347 "flash.release_tag_empty": "Имя тега не может быть пустым.",
348 "flash.release_tag_failed": "Не удалось создать тег: %s",
349 "flash.release_create_failed": "Не удалось создать релиз: %s",
350 "flash.release_published": "Релиз %s опубликован.",
351 "flash.release_delete_failed": "Не удалось удалить релиз: %s",
352 "flash.release_deleted": "Релиз удалён.",
353 "file.new_file": "Новый файл",
354 "file.new_folder": "Новая папка",
355 "file.path": "Путь",
356 "file.path_ph": "напр. src/main.go",
357 "file.folder_ph": "напр. docs",
358 "file.branch": "Ветка",
359 "file.content": "Содержимое",
360 "file.content_ph": "Текст файла…",
361 "file.message": "Сообщение коммита",
362 "file.create_file": "Создать файл",
363 "file.create_folder": "Создать папку",
364 "file.folder_hint": "Git не хранит пустые папки — Polar добавит туда .gitkeep.",
365 "flash.file_created": "Файл создан.",
366 "flash.folder_created": "Папка создана.",
367 "flash.file_exists": "Файл с таким путём уже существует.",
368 "flash.path_invalid": "Некорректный путь.",
369 "flash.file_create_failed": "Не удалось создать файл.",
370 "flash.folder_create_failed": "Не удалось создать папку.",
371 "file.upload_file": "Загрузить файлы",
372 "file.upload_dest": "Папка назначения",
373 "file.upload_dest_ph": "напр. docs/images (необязательно)",
374 "file.upload_pick": "Выберите файлы или перетащите сюда",
375 "file.upload_hint": "До 25 файлов, до 50 МБ суммарно.",
376 "file.upload_submit": "Загрузить",
377 "file.upload_replace_hint": "Существующие файлы будут перезаписаны.",
378 "flash.upload_done": "Загружено файлов: %d.",
379 "flash.upload_none": "Файлы не выбраны.",
380 "flash.upload_failed": "Не удалось загрузить файлы.",
381 "flash.upload_too_big": "Слишком большой объём — лимит 50 МБ.",
382 "flash.upload_too_many": "Слишком много файлов: максимум %d.", "flash.repo_settings_saved": "Настройки репозитория сохранены.",
383 "flash.repo_rename_failed": "Не удалось переименовать: %s",
384 "flash.repo_renamed": "Репозиторий переименован в %s.",
385 "flash.repo_confirm_mismatch": "Введённое имя не совпадает с названием репозитория.",
386 "flash.repo_deleted": "Репозиторий %s удалён.",
387 "flash.branch_created": "Ветка %s создана.",
388 "flash.branch_create_failed": "Не удалось создать ветку: %s",
389 "flash.branch_default_delete": "Нельзя удалить ветку по умолчанию.",
390 "flash.branch_deleted": "Ветка %s удалена.",
391 "flash.branch_delete_failed": "Не удалось удалить ветку: %s",
392 "flash.tag_created": "Тег %s создан.",
393 "flash.tag_create_failed": "Не удалось создать тег: %s",
394 "flash.tag_deleted": "Тег %s удалён.",
395 "flash.tag_delete_failed": "Не удалось удалить тег: %s",
396 "flash.issue_closed": "Задача #%d закрыта.",
397 "flash.issue_reopened": "Задача #%d открыта заново.",
398
399 // Ошибочные страницы
400 "err.not_found": "Не найдено",
401 "err.forbidden": "Доступ запрещён",
402 "err.session_error": "Ошибка сессии",
403 "err.session_create": "Не удалось создать сессию.",
404 "err.settings_error": "Ошибка настроек",
405 "err.settings_save": "Не удалось сохранить настройку.",
406 "err.explore_disabled": "Раздел «Обзор» отключён на этом сервере.",
407 "err.activity_disabled": "Активность отключена для этого репозитория.",
408 "err.pulls_disabled": "Пул-реквесты отключены для этого репозитория.",
409 "err.releases_disabled": "Релизы отключены для этого репозитория.",
410 "err.issues_disabled": "Задачи отключены для этого репозитория.",
411 "err.repo_not_found": "Репозиторий не найден",
412 "err.repo_not_found_desc": "Репозиторий не существует или у вас нет к нему доступа.",
413 "err.repo_private_desc": "Репозиторий не существует или является приватным.",
414 "err.access_denied": "Доступ запрещён",
415 "err.repo_write_denied": "У вас нет прав на изменение этого репозитория.",
416 "err.invalid_repo_path": "Некорректный путь репозитория",
417 "err.path_not_found": "Путь не найден",
418 "err.path_not_found_desc": "Не удалось найти путь в репозитории для ссылки %s",
419 "err.file_not_found": "Файл не найден",
420 "err.file_not_found_desc": "Запрошенный файл не найден в %s",
421 "err.commit_not_found": "Коммит не найден",
422 "err.commit_not_found_desc": "Не удалось найти коммит %s",
423 "err.pr_not_found": "Пул-реквест не найден",
424 "err.pr_not_found_desc": "Не удалось найти пул-реквест.",
425 "err.pr_state_forbidden": "Вы не можете изменить состояние этого пул-реквеста.",
426 "err.pr_merge_forbidden": "У вас нет прав на слияние пул-реквестов.",
427 "err.issue_not_found": "Задача не найдена",
428 "err.issue_not_found_desc": "Не удалось найти задачу.",
429 "err.issue_state_forbidden": "Вы не можете изменить состояние этой задачи.",
430 "err.delete_error": "Ошибка удаления",
431 "err.repo_delete_failed": "Не удалось удалить репозиторий.",
432 "err.user_not_found": "Пользователь @%s не существует.",
433 "err.archive_error": "Ошибка архива",
434 "err.archive_tar_failed": "Не удалось создать tar.gz архив для %s",
435 "err.archive_zip_failed": "Не удалось создать zip архив для %s",
436
437 // Форки
438 "fork.forked_from": "форк от",
439 "fork.forks": "Форки",
440 "fork.forks_btn": "Форки",
441 "fork.fork_btn": "Форк",
442 "fork.fork_btn_desc": "Создать форк этого репозитория",
443 "fork.your_fork": "Ваш форк",
444 "fork.your_fork_desc": "Перейти к вашему форку",
445 "forks.title": "Форки",
446 "forks.empty": "Пока никто не форкал этот репозиторий.",
447
448 // Коллабораторы
449 "collab.title": "Коллабораторы",
450 "collab.desc": "Люди с доступом к репозиторию",
451 "collab.owner": "Владелец",
452 "collab.role": "Роль",
453 "collab.role_read": "Чтение",
454 "collab.role_write": "Запись",
455 "collab.username": "Пользователь",
456 "collab.username_ph": "username",
457 "collab.add": "Добавить",
458 "collab.remove": "Убрать доступ",
459 "collab.empty": "Коллабораторов пока нет.",
460
461 // Ревью
462 "reviews.title": "Ревью",
463 "reviews.approved": "Одобрено",
464 "reviews.changes_requested": "Запрошены изменения",
465 "reviews.body_ph": "Комментарий к ревью (необязательно)",
466 "reviews.approve": "Одобрить",
467 "reviews.request_changes": "Запросить изменения",
468
469 // Device flow (RFC 8628)
470 "device.title": "Подключение устройства",
471 "device.badge": "Git",
472 "device.desc": "Введите код, который показал git или скрипт-помощник, чтобы выдать устройству доступ к вашему аккаунту.",
473 "device.check": "Проверить",
474 "device.authorize_for": "Выдать доступ по коду",
475 "device.scope_hint": "Доступ даётся на чтение и запись репозиториев, к которым у вас есть права, и действует только для этого устройства.",
476 "device.approve": "Разрешить",
477 "device.deny": "Отклонить",
478 "device.signin_to_approve": "Войдите, чтобы подтвердить доступ",
479 "device.helper_hint": "Подсказка: настройте credential helper, чтобы код запрашивался автоматически — см. README.",
480 "device.code_unknown": "Код не найден. Проверьте, что он введён верно.",
481 "device.code_used": "Этот код уже использован или истёк.",
482 "device.approved_now": "Готово! Устройство подключено — вернитесь в терминал.",
483 "device.denied_now": "Запрос отклонён. Устройство не получит доступ.",
484
485 // Flash: форки, коллабораторы, ревью, device flow
486 "flash.fork_self": "Это ваш репозиторий — форк не нужен.",
487 "flash.fork_exists": "У вас уже есть форк этого репозитория.",
488 "flash.fork_created": "Форк создан.",
489 "flash.fork_failed": "Не удалось создать форк: %s",
490 "flash.collab_added": "@%s добавлен в коллабораторы.",
491 "flash.collab_removed": "Доступ коллаборатора отозван.",
492 "flash.collab_failed": "Не удалось изменить коллаборатора: %s",
493 "flash.review_self": "Нельзя ревьюить собственный пул-реквест.",
494 "flash.review_closed": "Ревью доступно только для открытых пул-реквестов.",
495 "flash.review_failed": "Не удалось сохранить ревью: %s",
496 "flash.review_approved": "Ревью сохранено: одобрено.",
497 "flash.review_changes_requested": "Ревью сохранено: запрошены изменения.",
498 "flash.device_code_required": "Введите код устройства.",
499 "flash.device_code_invalid": "Код не найден, истёк или уже использован.",
500 "flash.device_approved": "Устройство авторизовано — можно возвращаться к git.",
501 "flash.device_denied": "Запрос отклонён.",
502
503 // Прочее
504 "issues.new": "Новая задача",
505 "pulls.head_repo": "Из репозитория",
506 "repo.about": "О репозитории",
507 "repo.clone_title": "Клонирование",
508 "repo.created": "Создан",
509 "repo.updated": "Обновлён",
510 "repo.view_file": "Открыть",
511 "err.collab_forbidden": "Управлять коллабораторами может только владелец или администратор.",
512 "err.pr_head_repo_invalid": "Выбран недопустимый репозиторий-источник."},
513 EN: {
514 // Navigation & Common
515 "app.tagline": "Lightweight self-hosted Git hosting",
516 "nav.home": "Home",
517 "nav.repositories": "Repositories",
518 "nav.explore": "Explore",
519 "nav.settings": "Settings",
520 "nav.admin": "Admin",
521 "nav.login": "Sign in",
522 "nav.register": "Sign up",
523 "nav.logout": "Sign out",
524 "nav.new_repo": "New",
525 "nav.command_palette": "Search & commands",
526 "nav.search_placeholder": "Search...",
527 "nav.theme": "Theme",
528 "nav.lang": "Language",
529 "common.copy": "Copy",
530 "common.copied": "Copied",
531 "common.cancel": "Cancel",
532 "common.save": "Save",
533 "common.delete": "Delete",
534 "common.close": "Close",
535 "common.never": "Never",
536 "common.newer": "Newer",
537 "common.older": "Older",
538 "common.up": "Up",
539
540 // Themes (only 3)
541 "theme.light": "Light",
542 "theme.dark": "Dark",
543 "theme.system": "System",
544
545 // Landing
546 "landing.badge": "Single Binary · SQLite · Zero Dependencies",
547 "landing.hero.title": "Lightweight self-hosted Git hosting",
548 "landing.hero.subtitle": "A single Go binary backed by SQLite. Deploys in a minute, uses minimal memory, and stays out of your way.",
549 "landing.hero.cta_start": "Get Started",
550 "landing.features.title": "Principles",
551 "landing.feat1.title": "Single Binary",
552 "landing.feat1.desc": "Templates, styles, fonts, migrations, and icons are compiled in via go:embed.",
553 "landing.feat2.title": "SQLite (WAL)",
554 "landing.feat2.desc": "Your entire database is a single data/polar.db file without CGO. Back up by copying.",
555 "landing.feat3.title": "Fast & Quiet",
556 "landing.feat3.desc": "Instant cold start, server-side rendering, and < 30 MB idle memory.",
557 "landing.feat4.title": "Private by Default",
558 "landing.feat4.desc": "Public and private repositories, Argon2id passwords, and Git HTTP access tokens.",
559
560 // Auth
561 "auth.login.title": "Sign in",
562 "auth.register.title": "Create account",
563 "auth.register.disabled": "Public registration is disabled by the administrator.",
564 "auth.username": "Username",
565 "auth.username_hint": "2–32 characters: letters, digits, hyphen, underscore",
566 "auth.username_or_email": "Username or Email",
567 "auth.email": "Email",
568 "auth.password": "Password",
569 "auth.password_hint": "At least 8 characters",
570 "auth.submit_login": "Sign in",
571 "auth.submit_register": "Create account",
572 "auth.no_account": "No account?",
573 "auth.have_account": "Have an account?",
574 "auth.invalid_creds": "Invalid username/email or password",
575
576 // Repositories
577 "repo.new.title": "New repository",
578 "repo.name": "Name",
579 "repo.name_hint": "Letters, digits, '.', '-', '_'",
580 "repo.description": "Description",
581 "repo.description_ph": "Short description (optional)",
582 "repo.visibility": "Visibility",
583 "repo.public": "Public",
584 "repo.public_desc": "Anyone can view and clone this repository",
585 "repo.private": "Private",
586 "repo.private_desc": "Accessible only to you",
587 "repo.create_btn": "Create repository",
588 "repo.filter_ph": "Filter repositories...",
589 "repo.empty_list": "No repositories yet",
590 "repo.empty_list_sub": "Create your first repository to push code.",
591 "repo.empty.title": "Repository is empty",
592 "repo.empty.new_cmd": "Create a new repository on the command line",
593 "repo.empty.push_cmd": "Push an existing repository",
594 "repo.tab.code": "Code",
595 "repo.tab.commits": "Commits",
596 "repo.tab.branches": "Branches & Tags",
597 "repo.tab.issues": "Issues",
598 "repo.tab.pulls": "Pull requests",
599 "repo.tab.releases": "Releases",
600 "repo.tab.activity": "Activity",
601 "repo.tab.settings": "Settings",
602 "repo.features": "Repository Features",
603 "repo.clone": "Clone",
604 "repo.download_zip": "Download ZIP",
605 "repo.branches": "Branches",
606 "repo.tags": "Tags",
607 "repo.default_branch": "Default branch",
608 "repo.find_file": "Filter files...",
609 "repo.files": "Files",
610 "repo.readme": "README",
611 "repo.raw": "Raw",
612 "repo.history": "History",
613 "repo.lines": "lines",
614 "repo.lines_one": "line",
615 "repo.lines_few": "lines",
616 "repo.lines_many": "lines",
617 "repo.binary_notice": "Binary file — inline preview unavailable",
618 "repo.download_raw": "Download file",
619 "repo.browse_at_commit": "Browse files",
620 "repo.files_changed": "files changed",
621 "repo.files_changed_one": "file changed",
622 "repo.files_changed_few": "files changed",
623 "repo.files_changed_many": "files changed",
624 "repo.no_commits": "No commits yet",
625 "repo.danger_zone": "Danger Zone",
626 "repo.delete": "Delete repository",
627 "repo.delete_desc": "Once deleted, the repository and its git history cannot be recovered.",
628 "repo.delete_confirm": "Type the repository name to confirm",
629 "repo.rename": "Rename",
630 "repo.save": "Save",
631 "repo.branch.new": "New branch",
632 "repo.branch.name_ph": "Branch name (e.g. feat/ui)",
633 "repo.branch.from": "From branch / ref",
634 "repo.branch.create": "Create branch",
635 "repo.branch.default": "default",
636 "repo.tag.new": "New tag / release",
637 "repo.tag.name_ph": "Tag (e.g. v1.0.0)",
638 "repo.tag.msg_ph": "Tag note (optional)",
639 "repo.tag.create": "Create tag",
640 "repo.tags.empty": "No tags yet",
641
642 // Pull Requests
643 "pulls.title": "Pull requests",
644 "pulls.new": "New pull request",
645 "pulls.empty": "No pull requests yet",
646 "pulls.open": "Open",
647 "pulls.closed": "Closed",
648 "pulls.merged": "Merged",
649 "pulls.compare": "Comparing changes",
650 "pulls.base": "base",
651 "pulls.head": "compare",
652 "pulls.title_ph": "Pull request title...",
653 "pulls.desc_ph": "Describe your changes (Markdown supported)...",
654 "pulls.create_btn": "Create pull request",
655 "pulls.merge_btn": "Merge pull request",
656 "pulls.can_merge": "Able to merge automatically.",
657 "pulls.cannot_merge": "Can't automatically merge: conflicts detected.",
658 "pulls.already_merged": "The head branch is already merged into base.",
659 "pulls.close_btn": "Close PR",
660 "pulls.reopen_btn": "Reopen PR",
661 "pulls.comment_btn": "Comment",
662 "pulls.conversation": "Conversation",
663 "pulls.files_changed": "Files changed",
664 "pulls.commits": "Commits",
665 "pulls.able_to_merge": "Able to merge automatically",
666 "pulls.body": "Description",
667 "pulls.body_ph": "Describe your changes (Markdown supported)...",
668 "pulls.branches_identical": "Branches are identical — nothing to compare",
669 "pulls.cannot_merge_warning": "Conflicts detected — automatic merge is not possible",
670 "pulls.closed_desc": "The head branch was not merged into base.",
671 "pulls.closed_message": "Pull request closed",
672 "pulls.comment_ph": "Write a comment (Markdown supported)...",
673 "pulls.compare_branches": "Comparing branches",
674 "pulls.conflicts_desc": "Resolve the conflicts locally and push to the head branch.",
675 "pulls.conflicts_title": "Merge conflicts detected",
676 "pulls.into": "into",
677 "pulls.merge_clean": "No conflicts — changes can be merged.",
678 "pulls.merged_message": "Pull request merged",
679 "pulls.no_changes": "No files changed",
680 "pulls.no_commits": "No commits in this pull request yet",
681 "pulls.only_write_merge": "Only users with write access can merge pull requests.",
682 "pulls.status.closed": "Closed",
683 "pulls.status.merged": "Merged",
684 "pulls.status.open": "Open",
685 "pulls.wants_to_merge": "wants to merge",
686
687 // Releases
688 "releases.title": "Releases",
689 "releases.new": "Draft a new release",
690 "releases.empty": "No releases yet",
691 "releases.tag_select": "Tag",
692 "releases.title_ph": "Release title",
693 "releases.desc_ph": "Describe this release, release notes (Markdown)...",
694 "releases.prerelease": "This is a pre-release",
695 "releases.publish": "Publish release",
696 "releases.delete": "Delete release",
697 "releases.assets": "Assets",
698 "releases.source_zip": "Source code (zip)",
699 "releases.source_tar": "Source code (tar.gz)",
700 "releases.body": "Description",
701 "releases.body_ph": "Describe this release, release notes (Markdown)...",
702 "releases.count": "releases",
703 "releases.count_one": "release",
704 "releases.count_few": "releases",
705 "releases.count_many": "releases",
706 "releases.delete_confirm": "Delete this release? This cannot be undone.",
707 "releases.is_prerelease": "This is a pre-release",
708 "releases.publish_btn": "Publish release",
709 "releases.tag_desc": "An existing tag or a new one — it will be created automatically.",
710 "releases.tag_name": "Tag",
711 "releases.tags": "tags",
712 "releases.tags_one": "tag",
713 "releases.tags_few": "tags",
714 "releases.tags_many": "tags",
715 "releases.target": "Branch",
716 "releases.target_desc": "Branch or commit the tag will point to.",
717
718 // Activity
719 "activity.title": "Activity",
720 "activity.pulse": "Activity overview",
721 "activity.empty": "No recent activity recorded.",
722 "activity.commits": "commits",
723 "activity.open_prs": "open PRs",
724 "activity.merged_prs": "merged PRs",
725 "activity.open_issues": "open issues",
726 "activity.releases": "releases",
727 "activity.issues": "opened and closed",
728 "activity.on_default_branch": "on the default branch",
729 "activity.published_releases": "published releases",
730 "activity.pull_requests": "opened and merged",
731 "activity.recent_feed": "Activity feed",
732 "activity.badge_commit": "commit",
733 "activity.badge_release": "release",
734
735 // Issues
736 "issue.new": "New issue",
737 "issue.title": "Title",
738 "issue.title_ph": "Brief summary of the issue",
739 "issue.body": "Description",
740 "issue.body_ph": "Detailed description (Markdown supported)...",
741 "issue.create": "Create issue",
742 "issue.open": "Open",
743 "issue.closed": "Closed",
744 "issue.status.open": "Open",
745 "issue.status.closed": "Closed",
746 "issue.close_btn": "Close issue",
747 "issue.reopen_btn": "Reopen",
748 "issue.comment_ph": "Write a comment (Markdown supported)...",
749 "issue.comment_btn": "Comment",
750 "issue.empty": "No issues in this list",
751
752 // Settings, Profile & Tokens
753 "settings.title": "Settings",
754 "settings.profile": "Profile",
755 "settings.avatar": "Avatar",
756 "settings.avatar_upload": "Choose image",
757 "settings.avatar_remove": "Remove avatar",
758 "settings.avatar_hint": "PNG, JPG, WebP, or GIF — automatically cropped to 256×256",
759 "settings.full_name": "Display name",
760 "settings.full_name_ph": "Your name",
761 "settings.bio": "Bio",
762 "settings.bio_ph": "Short profile bio",
763 "settings.location": "Location",
764 "settings.location_ph": "City, Country",
765 "settings.website": "Website",
766 "settings.website_ph": "https://example.com",
767 "profile.edit": "Edit profile",
768 "profile.joined": "Joined",
769 "profile.public_repos": "Public",
770 "profile.private_repos": "Private",
771 "profile.total_repos": "Repositories",
772 "settings.tokens": "Access Tokens",
773 "settings.tokens.desc": "Use a token instead of your password for git clone and git push over HTTP.",
774 "settings.token.name": "Token name (e.g., Laptop)",
775 "settings.token.create": "Create",
776 "settings.token.revoke": "Revoke",
777 "settings.token.created_once": "Copy this token now — it will only be shown once:",
778 "settings.token.col_name": "Name",
779 "settings.token.col_prefix": "Prefix",
780 "settings.token.col_created": "Created",
781 "settings.token.col_used": "Last used",
782 "settings.token.empty": "No access tokens yet",
783 "settings.password.current": "Current password",
784 "settings.password.new": "New password",
785 "settings.password.update": "Update password",
786
787 // Admin
788 "admin.title": "Administration",
789 "admin.features": "Features & Access",
790 "admin.users": "Users",
791 "admin.registration": "Public registration",
792 "admin.registration.desc": "Allow new users to create accounts",
793 "admin.explore": "Explore page",
794 "admin.explore.desc": "Show public repository directory in sidebar and at /explore",
795 "admin.landing": "Landing page",
796 "admin.landing.desc": "Show landing page on root URL (if disabled, redirects to repos or sign in)",
797 "admin.anon_read": "Anonymous read access",
798 "admin.anon_read.desc": "Allow unauthenticated guests to browse public repositories and profiles",
799 "admin.issues": "Issue tracker",
800 "admin.issues.desc": "Enable the Issues tab inside repositories",
801 "admin.enabled": "Enabled",
802 "admin.disabled": "Disabled",
803 "admin.enable_btn": "Enable",
804 "admin.disable_btn": "Disable",
805 "admin.col.user": "User",
806 "admin.col.repos": "Repos",
807 "admin.col.role": "Role",
808 "admin.col.joined": "Joined",
809 "admin.role.admin": "Admin",
810 "admin.role.user": "User",
811
812 // Command Palette & Shortcuts
813 "palette.placeholder": "Search repositories, files, or commands...",
814 "palette.group.nav": "Navigation",
815 "palette.group.themes": "Theme",
816 "palette.group.repos": "Repositories",
817 "shortcuts.title": "Keyboard shortcuts",
818 "shortcuts.palette": "Command palette",
819 "shortcuts.search": "Focus search",
820 "shortcuts.home": "Go home",
821 "shortcuts.repos": "Repositories",
822 "shortcuts.files": "Filter files",
823 "shortcuts.sidebar": "Toggle sidebar",
824 "nav.toggle_sidebar": "Sidebar (Ctrl+B)",
825
826 // Flash messages
827 "flash.welcome": "Welcome to Polar, @%s!",
828 "flash.profile_updated": "Profile updated.",
829 "flash.password_updated": "Password changed successfully.",
830 "flash.token_revoked": "Access token revoked.",
831 "flash.settings_updated": "Settings saved.",
832 "flash.error": "Error: %s",
833 "flash.comment_error": "Could not post the comment: %s",
834 "flash.pr_created": "Pull request #%d created.",
835 "flash.pr_closed": "Pull request #%d closed.",
836 "flash.pr_reopened": "Pull request #%d reopened.",
837 "flash.pr_merged": "Pull request #%d merged.",
838 "flash.pr_merged_state": "Cannot change the state of a merged pull request.",
839 "flash.pr_merge_open_only": "Only an open pull request can be merged.",
840 "flash.pr_merge_failed": "Could not merge: %s",
841 "flash.release_tag_empty": "Tag name cannot be empty.",
842 "flash.release_tag_failed": "Could not create the tag: %s",
843 "flash.release_create_failed": "Could not create the release: %s",
844 "flash.release_published": "Release %s published.",
845 "flash.release_delete_failed": "Could not delete the release: %s",
846 "flash.release_deleted": "Release deleted.",
847 "file.new_file": "New file",
848 "file.new_folder": "New folder",
849 "file.path": "Path",
850 "file.path_ph": "e.g. src/main.go",
851 "file.folder_ph": "e.g. docs",
852 "file.branch": "Branch",
853 "file.content": "Content",
854 "file.content_ph": "File contents…",
855 "file.message": "Commit message",
856 "file.create_file": "Create file",
857 "file.create_folder": "Create folder",
858 "file.folder_hint": "Git does not track empty folders — Polar adds a .gitkeep placeholder.",
859 "flash.file_created": "File created.",
860 "flash.folder_created": "Folder created.",
861 "flash.file_exists": "A file with that path already exists.",
862 "flash.path_invalid": "Invalid path.",
863 "flash.file_create_failed": "Could not create the file.",
864 "flash.folder_create_failed": "Could not create the folder.",
865 "file.upload_file": "Upload files",
866 "file.upload_dest": "Destination folder",
867 "file.upload_dest_ph": "e.g. docs/images (optional)",
868 "file.upload_pick": "Choose files or drag them here",
869 "file.upload_hint": "Up to 25 files, 50 MB in total.",
870 "file.upload_submit": "Upload",
871 "file.upload_replace_hint": "Existing files will be overwritten.",
872 "flash.upload_done": "Uploaded %d file(s).",
873 "flash.upload_none": "No files selected.",
874 "flash.upload_failed": "Could not upload the files.",
875 "flash.upload_too_big": "Upload is too large — 50 MB limit.",
876 "flash.upload_too_many": "Too many files: %d max.", "flash.repo_settings_saved": "Repository settings saved.",
877 "flash.repo_rename_failed": "Could not rename: %s",
878 "flash.repo_renamed": "Repository renamed to %s.",
879 "flash.repo_confirm_mismatch": "The name you typed does not match the repository name.",
880 "flash.repo_deleted": "Repository %s deleted.",
881 "flash.branch_created": "Branch %s created.",
882 "flash.branch_create_failed": "Could not create the branch: %s",
883 "flash.branch_default_delete": "The default branch cannot be deleted.",
884 "flash.branch_deleted": "Branch %s deleted.",
885 "flash.branch_delete_failed": "Could not delete the branch: %s",
886 "flash.tag_created": "Tag %s created.",
887 "flash.tag_create_failed": "Could not create the tag: %s",
888 "flash.tag_deleted": "Tag %s deleted.",
889 "flash.tag_delete_failed": "Could not delete the tag: %s",
890 "flash.issue_closed": "Issue #%d closed.",
891 "flash.issue_reopened": "Issue #%d reopened.",
892
893 // Error pages
894 "err.not_found": "Not found",
895 "err.forbidden": "Access denied",
896 "err.session_error": "Session error",
897 "err.session_create": "Could not create a session.",
898 "err.settings_error": "Settings error",
899 "err.settings_save": "Could not save the setting.",
900 "err.explore_disabled": "Explore is disabled on this server.",
901 "err.activity_disabled": "Activity is disabled for this repository.",
902 "err.pulls_disabled": "Pull requests are disabled for this repository.",
903 "err.releases_disabled": "Releases are disabled for this repository.",
904 "err.issues_disabled": "Issues are disabled for this repository.",
905 "err.repo_not_found": "Repository not found",
906 "err.repo_not_found_desc": "The repository does not exist or you do not have access to it.",
907 "err.repo_private_desc": "The repository does not exist or is private.",
908 "err.access_denied": "Access denied",
909 "err.repo_write_denied": "You do not have permission to modify this repository.",
910 "err.invalid_repo_path": "Invalid repository path",
911 "err.path_not_found": "Path not found",
912 "err.path_not_found_desc": "Could not find the path in the repository for ref %s",
913 "err.file_not_found": "File not found",
914 "err.file_not_found_desc": "The requested file was not found in %s",
915 "err.commit_not_found": "Commit not found",
916 "err.commit_not_found_desc": "Could not find commit %s",
917 "err.pr_not_found": "Pull request not found",
918 "err.pr_not_found_desc": "Could not find the pull request.",
919 "err.pr_state_forbidden": "You cannot change the state of this pull request.",
920 "err.pr_merge_forbidden": "You do not have permission to merge pull requests.",
921 "err.issue_not_found": "Issue not found",
922 "err.issue_not_found_desc": "Could not find the issue.",
923 "err.issue_state_forbidden": "You cannot change the state of this issue.",
924 "err.delete_error": "Delete error",
925 "err.repo_delete_failed": "Could not delete the repository.",
926 "err.user_not_found": "User @%s does not exist.",
927 "err.archive_error": "Archive error",
928 "err.archive_tar_failed": "Could not create a tar.gz archive for %s",
929 "err.archive_zip_failed": "Could not create a zip archive for %s",
930
931 // Forks
932 "fork.forked_from": "forked from",
933 "fork.forks": "Forks",
934 "fork.forks_btn": "Forks",
935 "fork.fork_btn": "Fork",
936 "fork.fork_btn_desc": "Create a fork of this repository",
937 "fork.your_fork": "Your fork",
938 "fork.your_fork_desc": "Go to your fork",
939 "forks.title": "Forks",
940 "forks.empty": "Nobody has forked this repository yet.",
941
942 // Collaborators
943 "collab.title": "Collaborators",
944 "collab.desc": "People with access to this repository",
945 "collab.owner": "Owner",
946 "collab.role": "Role",
947 "collab.role_read": "Read",
948 "collab.role_write": "Write",
949 "collab.username": "User",
950 "collab.username_ph": "username",
951 "collab.add": "Add",
952 "collab.remove": "Revoke access",
953 "collab.empty": "No collaborators yet.",
954
955 // Reviews
956 "reviews.title": "Reviews",
957 "reviews.approved": "Approved",
958 "reviews.changes_requested": "Changes requested",
959 "reviews.body_ph": "Review comment (optional)",
960 "reviews.approve": "Approve",
961 "reviews.request_changes": "Request changes",
962
963 // Device flow (RFC 8628)
964 "device.title": "Device authorization",
965 "device.badge": "Git",
966 "device.desc": "Enter the code shown by git or the credential helper to grant this device access to your account.",
967 "device.check": "Check",
968 "device.authorize_for": "Grant access to code",
969 "device.scope_hint": "Access covers repositories you can already reach and is bound to this device only.",
970 "device.approve": "Approve",
971 "device.deny": "Deny",
972 "device.signin_to_approve": "Sign in to approve access",
973 "device.helper_hint": "Tip: configure the credential helper so the code is requested automatically — see the README.",
974 "device.code_unknown": "Code not found. Double-check the code you entered.",
975 "device.code_used": "This code has already been used or expired.",
976 "device.approved_now": "All set! The device is authorized — return to your terminal.",
977 "device.denied_now": "Request denied. The device will not get access.",
978
979 // Flash: forks, collaborators, reviews, device flow
980 "flash.fork_self": "This repository is yours — no fork needed.",
981 "flash.fork_exists": "You already have a fork of this repository.",
982 "flash.fork_created": "Fork created.",
983 "flash.fork_failed": "Could not create fork: %s",
984 "flash.collab_added": "@%s added as a collaborator.",
985 "flash.collab_removed": "Collaborator access revoked.",
986 "flash.collab_failed": "Could not update collaborator: %s",
987 "flash.review_self": "You cannot review your own pull request.",
988 "flash.review_closed": "Reviews are only available on open pull requests.",
989 "flash.review_failed": "Could not save the review: %s",
990 "flash.review_approved": "Review saved: approved.",
991 "flash.review_changes_requested": "Review saved: changes requested.",
992 "flash.device_code_required": "Enter the device code.",
993 "flash.device_code_invalid": "Code not found, expired, or already used.",
994 "flash.device_approved": "Device authorized — you can return to git.",
995 "flash.device_denied": "Request denied.",
996
997 // Misc
998 "issues.new": "New issue",
999 "pulls.head_repo": "From repository",
1000 "repo.about": "About",
1001 "repo.clone_title": "Clone",
1002 "repo.created": "Created",
1003 "repo.updated": "Updated",
1004 "repo.view_file": "Open",
1005 "err.collab_forbidden": "Only the owner or an administrator can manage collaborators.",
1006 "err.pr_head_repo_invalid": "The selected source repository is not allowed."},
1007 }
1008
1009 func T(lang Lang, key string) string {
1010 dict, ok := translations[Normalize(string(lang))]
1011 if !ok {
1012 dict = translations[RU]
1013 }
1014 if val, ok := dict[key]; ok {
1015 return val
1016 }
1017 if val, ok := translations[RU][key]; ok {
1018 return val
1019 }
1020 return key
1021 }
1022