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