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