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