diff --git a/catalog_gen.go b/catalog_gen.go new file mode 100644 index 0000000..f4c390e --- /dev/null +++ b/catalog_gen.go @@ -0,0 +1,75 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package main + +import ( + "golang.org/x/text/language" + "golang.org/x/text/message" + "golang.org/x/text/message/catalog" +) + +type dictionary struct { + index []uint32 + data string +} + +func (d *dictionary) Lookup(key string) (data string, ok bool) { + p, ok := messageKeyToIndex[key] + if !ok { + return "", false + } + start, end := d.index[p], d.index[p+1] + if start == end { + return "", false + } + return d.data[start:end], true +} + +func init() { + dict := map[string]catalog.Dictionary{ + "en": &dictionary{index: enIndex, data: enData}, + "ru": &dictionary{index: ruIndex, data: ruData}, + } + fallback := language.MustParse("en") + cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) + if err != nil { + panic(err) + } + message.DefaultCatalog = cat +} + +var messageKeyToIndex = map[string]int{ + "Allow": 6, + "Authorize": 2, + "Authorize %s": 0, + "Authorize application": 1, + "Check your scopes": 4, + "Create a new remote token": 8, + "Deny": 5, + "Send": 9, + "Sign In": 7, + "application": 3, +} + +var enIndex = []uint32{ // 11 elements + 0x00000000, 0x00000010, 0x00000026, 0x00000030, + 0x0000003c, 0x0000004e, 0x00000053, 0x00000059, + 0x00000061, 0x0000007b, 0x00000080, +} // Size: 68 bytes + +const enData string = "" + // Size: 128 bytes + "\x02Authorize %[1]s\x02Authorize application\x02Authorize\x02application" + + "\x02Check your scopes\x02Deny\x02Allow\x02Sign In\x02Create a new remote" + + " token\x02Send" + +var ruIndex = []uint32{ // 11 elements + 0x00000000, 0x00000000, 0x0000002e, 0x0000002e, + 0x0000002e, 0x00000057, 0x00000068, 0x0000007b, + 0x00000086, 0x00000086, 0x00000086, +} // Size: 68 bytes + +const ruData string = "" + // Size: 134 bytes + "\x02Авторизовать приложение\x02Проверь права доступа\x02Отказать\x02Разр" + + "ешить\x02Войти" + + // Total table size 398 bytes (0KiB); checksum: 1F3647E6 diff --git a/locales/en/messages.gotext.json b/locales/en/messages.gotext.json new file mode 100644 index 0000000..10165cd --- /dev/null +++ b/locales/en/messages.gotext.json @@ -0,0 +1,57 @@ +{ + "language": "en", + "messages": [ + { + "id": "Authorize {ClientName}", + "message": "Authorize {ClientName}", + "translation": "Authorize {ClientName}", + "translatorComment": "Authorization page header with the name of the application", + "placeholders": [ + { + "id": "ClientName", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "p.ClientName" + } + ], + "fuzzy": true + }, + { + "id": "Authorize application", + "message": "Authorize application", + "translation": "Authorize application", + "translatorComment": "Authorization page header for an unnamed application", + "fuzzy": true + }, + { + "id": "Check your scopes", + "message": "Check your scopes", + "translation": "Check your scopes", + "translatorComment": "Name of the section with the set of access rights checkboxes on the login page", + "fuzzy": true + }, + { + "id": "Deny", + "message": "Deny", + "translation": "Deny", + "translatorComment": "Name of the button to interrupt the application authorization process", + "fuzzy": true + }, + { + "id": "Allow", + "message": "Allow", + "translation": "Allow", + "translatorComment": "The name of the button to continue the application authorization process", + "fuzzy": true + }, + { + "id": "Sign In", + "message": "Sign In", + "translation": "Sign In", + "translatorComment": "The name of the button in the site address entry form to start the login process", + "fuzzy": true + } + ] +} diff --git a/locales/en/out.gotext.json b/locales/en/out.gotext.json new file mode 100644 index 0000000..f96944f --- /dev/null +++ b/locales/en/out.gotext.json @@ -0,0 +1,85 @@ +{ + "language": "en", + "messages": [ + { + "id": "Authorize {Name0}", + "message": "Authorize {Name0}", + "translation": "Authorize {Name0}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Name0", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "p.Client.Name[0]" + } + ], + "fuzzy": true + }, + { + "id": "Authorize application", + "message": "Authorize application", + "translation": "Authorize application", + "translatorComment": "Authorization page header for an unnamed application", + "fuzzy": true + }, + { + "id": "Authorize", + "message": "Authorize", + "translation": "Authorize", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "application", + "message": "application", + "translation": "application", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Check your scopes", + "message": "Check your scopes", + "translation": "Check your scopes", + "translatorComment": "Name of the section with the set of access rights checkboxes on the login page", + "fuzzy": true + }, + { + "id": "Deny", + "message": "Deny", + "translation": "Deny", + "translatorComment": "Name of the button to interrupt the application authorization process", + "fuzzy": true + }, + { + "id": "Allow", + "message": "Allow", + "translation": "Allow", + "translatorComment": "The name of the button to continue the application authorization process", + "fuzzy": true + }, + { + "id": "Sign In", + "message": "Sign In", + "translation": "Sign In", + "translatorComment": "The name of the button in the site address entry form to start the login process", + "fuzzy": true + }, + { + "id": "Create a new remote token", + "message": "Create a new remote token", + "translation": "Create a new remote token", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Send", + "message": "Send", + "translation": "Send", + "translatorComment": "Copied from source.", + "fuzzy": true + } + ] +} \ No newline at end of file diff --git a/locales/ru/messages.gotext.json b/locales/ru/messages.gotext.json new file mode 100644 index 0000000..1e868a9 --- /dev/null +++ b/locales/ru/messages.gotext.json @@ -0,0 +1,51 @@ +{ + "language": "ru", + "messages": [ + { + "id": "Authorize {ClientName}", + "message": "Authorize {ClientName}", + "translation": "Авторизовать {ClientName}", + "translatorComment": "Заголовок страницы авторизации с именем приложения", + "placeholders": [ + { + "id": "ClientName", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "p.ClientName" + } + ] + }, + { + "id": "Authorize application", + "message": "Authorize application", + "translation": "Авторизовать приложение", + "translatorComment": "Заголовок страницы авторизации безымянного приложения" + }, + { + "id": "Check your scopes", + "message": "Check your scopes", + "translation": "Проверь права доступа", + "translatorComment": "Имя секции с набором чекбоксов прав доступа на странице авторизации" + }, + { + "id": "Deny", + "message": "Deny", + "translation": "Отказать", + "translatorComment": "Название кнопки прерывания процесса авторизациии приложения" + }, + { + "id": "Allow", + "message": "Allow", + "translation": "Разрешить", + "translatorComment": "Название кнопки продолжения процесса авторизациии приложения" + }, + { + "id": "Sign In", + "message": "Sign In", + "translation": "Войти", + "translatorComment": "Название кнопки в форме ввода адреса сайта для начала процесса входа" + } + ] +} diff --git a/locales/ru/out.gotext.json b/locales/ru/out.gotext.json new file mode 100644 index 0000000..4503ae1 --- /dev/null +++ b/locales/ru/out.gotext.json @@ -0,0 +1,70 @@ +{ + "language": "ru", + "messages": [ + { + "id": "Authorize {Name0}", + "message": "Authorize {Name0}", + "translation": "", + "placeholders": [ + { + "id": "Name0", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "p.Client.Name[0]" + } + ] + }, + { + "id": "Authorize application", + "message": "Authorize application", + "translation": "Авторизовать приложение", + "translatorComment": "Заголовок страницы авторизации безымянного приложения" + }, + { + "id": "Authorize", + "message": "Authorize", + "translation": "" + }, + { + "id": "application", + "message": "application", + "translation": "" + }, + { + "id": "Check your scopes", + "message": "Check your scopes", + "translation": "Проверь права доступа", + "translatorComment": "Имя секции с набором чекбоксов прав доступа на странице авторизации" + }, + { + "id": "Deny", + "message": "Deny", + "translation": "Отказать", + "translatorComment": "Название кнопки прерывания процесса авторизациии приложения" + }, + { + "id": "Allow", + "message": "Allow", + "translation": "Разрешить", + "translatorComment": "Название кнопки продолжения процесса авторизациии приложения" + }, + { + "id": "Sign In", + "message": "Sign In", + "translation": "Войти", + "translatorComment": "Название кнопки в форме ввода адреса сайта для начала процесса входа" + }, + { + "id": "Create a new remote token", + "message": "Create a new remote token", + "translation": "" + }, + { + "id": "Send", + "message": "Send", + "translation": "" + } + ] +} \ No newline at end of file