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