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