master #61

Merged
asmeron merged 9 commits from YanTheKaller/libublsettings:master into master 4 weeks ago

@ -94,6 +94,13 @@ install: check
@if [ -z ${DESTDIR} ]; then \ @if [ -z ${DESTDIR} ]; then \
ldconfig -n ${DESTDIR}${PREFIX}/lib; \ ldconfig -n ${DESTDIR}${PREFIX}/lib; \
fi fi
@for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \
install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \
# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
PKGNAME_PO="./locale/${PKGNAME}_$${LANG}.po"; [[ -f "$${PKGNAME_PO}" ]] || PKGNAME_PO= ; \
msgfmt --verbose --use-fuzzy --output-file "$${PATH_FILE_MO}" - < <(msgcat --use-first --no-wrap $${PKGNAME_PO} ./locale/*_$${LANG}.po); \
done
@echo "Install: OK" @echo "Install: OK"
clean: clean:

@ -0,0 +1,764 @@
#: ./locales.csv:1
msgid "Afar"
msgstr ""
#: ./locales.csv:1
msgid "Abkhazian"
msgstr ""
#: ./locales.csv:1
msgid "Aguaruna"
msgstr ""
#: ./locales.csv:1
msgid "Akan"
msgstr ""
#: ./locales.csv:1
msgid "Amharic"
msgstr ""
#: ./locales.csv:1
msgid "Aragonese"
msgstr ""
msgid "Angika"
msgstr ""
msgid "Arabic"
msgstr ""
msgid "Asturian"
msgstr ""
msgid "Aymara"
msgstr ""
msgid "South Azerbaijani"
msgstr ""
msgid "Bemba"
msgstr ""
msgid "Berber"
msgstr ""
msgid "Bhili"
msgstr ""
msgid "Bhojpuri"
msgstr ""
msgid "Bislama"
msgstr ""
msgid "Bangla"
msgstr ""
msgid "Tibetan"
msgstr ""
msgid "Breton"
msgstr ""
msgid "Bodo"
msgstr ""
msgid "Bosnain"
msgstr ""
msgid "Blin"
msgstr ""
msgid "Catalan"
msgstr ""
msgid "Chechen"
msgstr ""
msgid "Cherokee"
msgstr ""
msgid "Central Kurdish"
msgstr ""
msgid "Mandarin Chinese"
msgstr ""
msgid "Crimean Tatar"
msgstr ""
msgid "Kashubian"
msgstr ""
msgid "Chuvash"
msgstr ""
msgid "Welsh"
msgstr ""
msgid "Austrian German"
msgstr ""
msgid "Swiss High Gernam"
msgstr ""
msgid "German"
msgstr ""
msgid "Dogri"
msgstr ""
msgid "Lower Sorbian"
msgstr ""
msgid "Divehi"
msgstr ""
msgid "Dzongkha"
msgstr ""
msgid "English"
msgstr ""
msgid "Spanish"
msgstr ""
msgid "Basque"
msgstr ""
msgid "Persian"
msgstr ""
msgid "Fulah"
msgstr ""
msgid "Filipino"
msgstr ""
msgid "Faroese"
msgstr ""
msgid "Swiss French"
msgstr ""
msgid "Friulian"
msgstr ""
msgid "Western Frisian"
msgstr ""
msgid "Irish"
msgstr ""
msgid "Garhwali"
msgstr ""
msgid "Scottish Gaelic"
msgstr ""
msgid "Geez"
msgstr ""
msgid "Galician"
msgstr ""
msgid "Manx"
msgstr ""
msgid "Hausa"
msgstr ""
msgid "Hakka Chinese"
msgstr ""
msgid "Fiji Hindi"
msgstr ""
msgid "Chhattisgarhi"
msgstr ""
msgid "Upper Sorbian"
msgstr ""
msgid "Haitian Creole"
msgstr ""
msgid "Interlingua"
msgstr ""
msgid "Igbo"
msgstr ""
msgid "Inupiaq"
msgstr ""
msgid "Inalian"
msgstr ""
msgid "Inuktitut"
msgstr ""
msgid "Kabyle"
msgstr ""
msgid "Kalaallisut"
msgstr ""
msgid "Khmer"
msgstr ""
msgid "Korean"
msgstr ""
msgid "Konkani"
msgstr ""
msgid "Kurdish"
msgstr ""
msgid "Komi"
msgstr ""
msgid "Cornish"
msgstr ""
msgid "Kyrgyz"
msgstr ""
msgid "Luxembourgish"
msgstr ""
msgid "Ganda"
msgstr ""
msgid "Limburgish"
msgstr ""
msgid "Ligurian"
msgstr ""
msgid "Lingala"
msgstr ""
msgid "Lao"
msgstr ""
msgid "Literary Chinese"
msgstr ""
msgid "Magahi"
msgstr ""
msgid "Maithili"
msgstr ""
msgid "Morisyen"
msgstr ""
msgid "Malagasy"
msgstr ""
msgid "Meadow Mari"
msgstr ""
msgid "Maori"
msgstr ""
msgid "Miskito"
msgstr ""
msgid "Karbi"
msgstr ""
msgid "Mongolian"
msgstr ""
msgid "Manipuri"
msgstr ""
msgid "Mon"
msgstr ""
msgid "Maltese"
msgstr ""
msgid "Burmese"
msgstr ""
msgid "Min Nan Chinese"
msgstr ""
msgid "Norwegian Bokmål"
msgstr ""
msgid "Low German"
msgstr ""
msgid "Low Saxon"
msgstr ""
msgid "Nepali"
msgstr ""
msgid "Central Nahuatl"
msgstr ""
msgid "Niuean"
msgstr ""
msgid "Dutch"
msgstr ""
msgid "Flemish"
msgstr ""
msgid "Norwegian Nynorsk"
msgstr ""
msgid "South Ndebele"
msgstr ""
msgid "Northern Sotho"
msgstr ""
msgid "Occitan"
msgstr ""
msgid "Oromo"
msgstr ""
msgid "Odia"
msgstr ""
msgid "Ossetic"
msgstr ""
msgid "Punjabi"
msgstr ""
msgid "Papiamento"
msgstr ""
msgid "Pashto"
msgstr ""
msgid "Brazilian Portuguese"
msgstr ""
msgid "European Portuguese"
msgstr ""
msgid "Cusco Quechua"
msgstr ""
msgid "Rajasthani"
msgstr ""
msgid "Tarifit"
msgstr ""
msgid "Kinyarwanda"
msgstr ""
msgid "Sakha"
msgstr ""
msgid "Santali"
msgstr ""
msgid "Sardinian"
msgstr ""
msgid "Sindhi"
msgstr ""
msgid "Northern Sami"
msgstr ""
msgid "Samogitian"
msgstr ""
msgid "Shan"
msgstr ""
msgid "Shuswap"
msgstr ""
msgid "Shinhala"
msgstr ""
msgid "Sidamo"
msgstr ""
msgid "Samoan"
msgstr ""
msgid "Somali"
msgstr ""
msgid "Albanian"
msgstr ""
msgid "Swati"
msgstr ""
msgid "Saho"
msgstr ""
msgid "Southern Sotho"
msgstr ""
msgid "Sundanese"
msgstr ""
msgid "Swedish"
msgstr ""
msgid "Swahili"
msgstr ""
msgid "Silesian"
msgstr ""
msgid "Tamil"
msgstr ""
msgid "Tulu"
msgstr ""
msgid "Tajik"
msgstr ""
msgid "Chitwania Tharu"
msgstr ""
msgid "Tigrinya"
msgstr ""
msgid "Tigre"
msgstr ""
msgid "Turkmen"
msgstr ""
msgid "Tagalog"
msgstr ""
msgid "Tswana"
msgstr ""
msgid "Tongan"
msgstr ""
msgid "Tok Pisin"
msgstr ""
msgid "Turkish"
msgstr ""
msgid "Tsonga"
msgstr ""
msgid "Tatar"
msgstr ""
msgid "Uyghur"
msgstr ""
msgid "Unami Delaware"
msgstr ""
msgid "Urdu"
msgstr ""
msgid "Uzbek"
msgstr ""
msgid "Venda"
msgstr ""
msgid "Walloon"
msgstr ""
msgid "Walser"
msgstr ""
msgid "Wolaytta"
msgstr ""
msgid "Wolof"
msgstr ""
msgid "Xhosa"
msgstr ""
msgid "Yiddish"
msgstr ""
msgid "Yoruba"
msgstr ""
msgid "Cantonese"
msgstr ""
msgid "Yau"
msgstr ""
msgid "Moroccan Tamazight"
msgstr ""
msgid "Chinese"
msgstr ""
msgid "Zulu"
msgstr ""
#: ./locales.csv:1
msgid "Afrikaans"
msgstr ""
#: ./locales.csv:2
msgid "Arabic"
msgstr ""
#: ./locales.csv:16
msgid "Assamese"
msgstr ""
#: ./locales.csv:17
msgid "Azerbaijani"
msgstr ""
#: ./locales.csv:18
msgid "Belarusian"
msgstr ""
#: ./locales.csv:19
msgid "Bulgarian"
msgstr ""
#: ./locales.csv:20
msgid "Bengali"
msgstr ""
#: ./locales.csv:21
msgid "Bosnian"
msgstr ""
#: ./locales.csv:22
msgid "Catalan"
msgstr ""
#: ./locales.csv:23
msgid "Czech"
msgstr ""
#: ./locales.csv:24
msgid "Danish"
msgstr ""
#: ./locales.csv:25
msgid "German"
msgstr ""
#: ./locales.csv:31
msgid "Greek"
msgstr ""
#: ./locales.csv:33
msgid "English"
msgstr ""
#: ./locales.csv:46
msgid "Spanish"
msgstr ""
#: ./locales.csv:66
msgid "Estonian"
msgstr ""
#: ./locales.csv:67
msgid "Finnish"
msgstr ""
#: ./locales.csv:68
msgid "French"
msgstr ""
#: ./locales.csv:73
msgid "Gujarati"
msgstr ""
#: ./locales.csv:74
msgid "Hebrew"
msgstr ""
#: ./locales.csv:75
msgid "Hindi"
msgstr ""
#: ./locales.csv:76
msgid "Croatian"
msgstr ""
#: ./locales.csv:77
msgid "Hungarian"
msgstr ""
#: ./locales.csv:78
msgid "Armenian"
msgstr ""
#: ./locales.csv:79
msgid "Indonesian"
msgstr ""
#: ./locales.csv:80
msgid "Icelandic"
msgstr ""
#: ./locales.csv:81
msgid "Italian"
msgstr ""
#: ./locales.csv:83
msgid "Japanese"
msgstr ""
#: ./locales.csv:84
msgid "Georgian"
msgstr ""
#: ./locales.csv:85
msgid "Kazakh"
msgstr ""
#: ./locales.csv:86
msgid "Kannada"
msgstr ""
#: ./locales.csv:88
msgid ""
msgstr ""
#: ./locales.csv:91
msgid "Kirghiz"
msgstr ""
#: ./locales.csv:92
msgid "Lithuanian"
msgstr ""
#: ./locales.csv:93
msgid "Latvian"
msgstr ""
#: ./locales.csv:94
msgid "Macedonian"
msgstr ""
#: ./locales.csv:95
msgid "Malayalam"
msgstr ""
#: ./locales.csv:96
msgid "Marathi"
msgstr ""
#: ./locales.csv:97
msgid "Malay"
msgstr ""
#: ./locales.csv:99
msgid "Bokmal"
msgstr ""
#: ./locales.csv:102
msgid "Nynorsk"
msgstr ""
#: ./locales.csv:103
msgid "Oriya"
msgstr ""
#: ./locales.csv:104
msgid "Punjabi"
msgstr ""
#: ./locales.csv:105
msgid "Polish"
msgstr ""
#: ./locales.csv:106
msgid "Portuguese"
msgstr ""
#: ./locales.csv:108
msgid "Romanian"
msgstr ""
#: ./locales.csv:109
msgid "Russian"
msgstr ""
#: ./locales.csv:111
msgid "Sanskrit"
msgstr ""
#: ./locales.csv:112
msgid "Slovak"
msgstr ""
#: ./locales.csv:113
msgid "Slovenian"
msgstr ""
#: ./locales.csv:114
msgid "Albanian"
msgstr ""
#: ./locales.csv:115
msgid "Serbian"
msgstr ""
#: ./locales.csv:119
msgid "Swedish"
msgstr ""
#: ./locales.csv:120
msgid "Tamil"
msgstr ""
#: ./locales.csv:121
msgid "Telugu"
msgstr ""
#: ./locales.csv:122
msgid "Thai"
msgstr ""
#: ./locales.csv:123
msgid "Turkish"
msgstr ""
#: ./locales.csv:124
msgid "Ukrainian"
msgstr ""
#: ./locales.csv:125
msgid "Vietnamese"
msgstr ""
#: ./locales.csv:126
msgid "Simplified Chinese"
msgstr ""
#: ./locales.csv:127
msgid "Traditional Chinese"
msgstr ""
#: ./locales.csv:128
msgid "Chinese"
msgstr ""

@ -0,0 +1,738 @@
# Language translations for ubinstall package.
# Copyright (C) 2022, UBTech LLC
# This file is distributed under the same license as the ubinstal package.
# UBLinux Team <info@ublinux.com>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ubinstal 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-22 16:12+0600\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ./locales.csv:1
msgid "Afar"
msgstr "Афар"
#: ./locales.csv:1
msgid "Abkhazian"
msgstr "Абхазский"
#: ./locales.csv:1
msgid "Aguaruna"
msgstr "Агуаруна"
#: ./locales.csv:1
msgid "Akan"
msgstr "Акан"
#: ./locales.csv:1
msgid "Amharic"
msgstr "Амхарский"
#: ./locales.csv:1
msgid "Aragonese"
msgstr "Арагонский диалект"
msgid "Angika"
msgstr "Ангика"
msgid "Arabic"
msgstr "Арабский"
msgid "Asturian"
msgstr "Астурия"
msgid "Aymara"
msgstr "Аймара"
msgid "South Azerbaijani"
msgstr "Южноазербайджансий"
msgid "Bemba"
msgstr "Бемба"
msgid "Berber"
msgstr "Берберский"
msgid "Bhili"
msgstr "Бхили"
msgid "Bhojpuri"
msgstr "Бходжпури"
msgid "Bislama"
msgstr "Бислама"
msgid "Bangla"
msgstr "Бангла"
msgid "Tibetan"
msgstr "Тибетский"
msgid "Breton"
msgstr "Бретон"
msgid "Bodo"
msgstr "Бодо"
msgid "Bosnain"
msgstr "Босней"
msgid "Blin"
msgstr "Блин"
msgid "Catalan"
msgstr "Каталонский"
msgid "Czech"
msgstr "Чешский"
msgid "Chechen"
msgstr "Чеченский"
msgid "Cherokee"
msgstr "Чероки"
msgid "Central Kurdish"
msgstr "Центральнокурдский"
msgid "Mandarin Chinese"
msgstr "Мадаринский китайский"
msgid "Crimean Tatar"
msgstr "Крымскотатарский"
msgid "Kashubian"
msgstr "Кашубский"
msgid "Chuvash"
msgstr "Чувашский"
msgid "Welsh"
msgstr "Валлийский"
msgid "Austrian German"
msgstr "Австрийский немецкий"
msgid "Swiss High Gernam"
msgstr "Швейцарский верхнелужицкий"
msgid "German"
msgstr "Немецкий"
msgid "Dogri"
msgstr "Догри"
msgid "Lower Sorbian"
msgstr "Нижнелужицкий"
msgid "Divehi"
msgstr "Дивехи"
msgid "Dzongkha"
msgstr "Даонкха"
msgid "English"
msgstr "Английский"
msgid "Spanish"
msgstr "Испанский"
msgid "Basque"
msgstr "Баскский"
msgid "Persian"
msgstr "Персидский"
msgid "Fulah"
msgstr "Фулах"
msgid "Filipino"
msgstr "Филиппинский"
msgid "Faroese"
msgstr "Фарерский"
msgid "Swiss French"
msgstr "Швейцарский французский"
msgid "Friulian"
msgstr "Фриульский"
msgid "Western Frisian"
msgstr "Западнофризский"
msgid "Irish"
msgstr "Ирландский"
msgid "Garhwali"
msgstr "Гархвали"
msgid "Scottish Gaelic"
msgstr "Шотландский гэльский"
msgid "Geez"
msgstr "Гиз"
msgid "Galician"
msgstr "Галисийский"
msgid "Manx"
msgstr "Мэнский"
msgid "Hausa"
msgstr "Хауса"
msgid "Hakka Chinese"
msgstr "Хакка"
msgid "Fiji Hindi"
msgstr "Фиджи Хинди"
msgid "Chhattisgarhi"
msgstr "Чхаттисгархи"
msgid "Upper Sorbian"
msgstr "Верхняя Сербия"
msgid "Haitian Creole"
msgstr "Гаитянский креольский"
msgid "Interlingua"
msgstr "Интерлингва"
msgid "Igbo"
msgstr "Игбо"
msgid "Inupiaq"
msgstr "Инупиак"
msgid "Inalian"
msgstr "Инальян"
msgid "Inuktitut"
msgstr "Инуктитут"
msgid "Kabyle"
msgstr "Кабил"
msgid "Kalaallisut"
msgstr "Калааллисут"
msgid "Khmer"
msgstr "Кхмерский"
msgid "Korean"
msgstr "Корейский"
msgid "Konkani"
msgstr "Конкани"
msgid "Kurdish"
msgstr "Курдский"
msgid "Komi"
msgstr "Коми"
msgid "Cornish"
msgstr "Корнуолл"
msgid "Kyrgyz"
msgstr "Киргизский"
msgid "Luxembourgish"
msgstr "Люксембургский"
msgid "Ganda"
msgstr "Ганда"
msgid "Limburgish"
msgstr "Лимбургский"
msgid "Ligurian"
msgstr "Лигурия"
msgid "Lingala"
msgstr "Лингала"
msgid "Lao"
msgstr "Лао"
msgid "Literary Chinese"
msgstr "Китайская литература"
msgid "Magahi"
msgstr "Магахи"
msgid "Maithili"
msgstr "Маитхили"
msgid "Morisyen"
msgstr "Морисьен"
msgid "Malagasy"
msgstr "Малагасы"
msgid "Meadow Mari"
msgstr "Луг Марийский"
msgid "Maori"
msgstr "Маори"
msgid "Miskito"
msgstr "Мискито"
msgid "Karbi"
msgstr "Карби"
msgid "Mongolian"
msgstr "Монгольский"
msgid "Manipuri"
msgstr "Манипури"
msgid "Mon"
msgstr "Монский"
msgid "Maltese"
msgstr "Мальтийский"
msgid "Burmese"
msgstr "Бирманский"
msgid "Min Nan Chinese"
msgstr "Мин Нан Китайский"
msgid "Norwegian Bokmål"
msgstr "Норвежский букмаль"
msgid "Low German"
msgstr "Нижнегерманский"
msgid "Low Saxon"
msgstr "Нижнесаксонский"
msgid "Nepali"
msgstr "Непальский"
msgid "Central Nahuatl"
msgstr "Центральный науатль"
msgid "Niuean"
msgstr "Ниуэ"
msgid "Dutch"
msgstr "Голландский"
msgid "Flemish"
msgstr "Фламандский"
msgid "Norwegian Nynorsk"
msgstr "Норвежский нюнорск"
msgid "South Ndebele"
msgstr "Южный ндебеле"
msgid "Northern Sotho"
msgstr "Северный сото"
msgid "Occitan"
msgstr "Окситанский"
msgid "Oromo"
msgstr "Оромо"
msgid "Odia"
msgstr "Одия"
msgid "Ossetic"
msgstr "Осетинский"
msgid "Punjabi"
msgstr "Пенджаби"
msgid "Papiamento"
msgstr "Папиаменто"
msgid "Pashto"
msgstr "Пушту"
msgid "Brazilian Portuguese"
msgstr "Бразильский португальский"
msgid "European Portuguese"
msgstr "Европейский португальский"
msgid "Cusco Quechua"
msgstr "Куско Кечуа"
msgid "Rajasthani"
msgstr "Раджастхани"
msgid "Tarifit"
msgstr "Тарифит"
msgid "Kinyarwanda"
msgstr "Киньяруанда"
msgid "Sakha"
msgstr "Саха"
msgid "Santali"
msgstr "Сантали"
msgid "Sardinian"
msgstr "Сардиния"
msgid "Sindhi"
msgstr "Синдхи"
msgid "Northern Sami"
msgstr "Северные саамы"
msgid "Samogitian"
msgstr "Жемайтийский"
msgid "Shan"
msgstr "Шан"
msgid "Shuswap"
msgstr "Шусвап"
msgid "Sinhala"
msgstr "Шинхала"
msgid "Sidamo"
msgstr "Сидамо"
msgid "Samoan"
msgstr "Самоа"
msgid "Somali"
msgstr "Сомали"
msgid "Albanian"
msgstr "Албанский"
msgid "Swati"
msgstr "Свати"
msgid "Saho"
msgstr "Сахо"
msgid "Southern Sotho"
msgstr "Южный Сото"
msgid "Sundanese"
msgstr "Сунданский"
msgid "Swedish"
msgstr "Шведский"
msgid "Swahili"
msgstr "Суахили"
msgid "Silesian"
msgstr "Силезский"
msgid "Tamil"
msgstr "Тамильский"
msgid "Tulu"
msgstr "Тулу"
msgid "Tajik"
msgstr "Таджикский"
msgid "Chitwania Tharu"
msgstr "Читвания Тару"
msgid "Tigrinya"
msgstr "Тигринья"
msgid "Tigre"
msgstr "Тигре"
msgid "Turkmen"
msgstr "Туркмен"
msgid "Tagalog"
msgstr "Тагальский"
msgid "Tswana"
msgstr "Тсвана"
msgid "Tongan"
msgstr "Тонганский"
msgid "Tok Pisin"
msgstr "Ток-писин"
msgid "Turkish"
msgstr "Турецкий"
msgid "Tsonga"
msgstr "Тсонга"
msgid "Tatar"
msgstr "Татарский"
msgid "Uyghur"
msgstr "Уйгурский"
msgid "Unami Delaware"
msgstr "Унами, Делавэр"
msgid "Urdu"
msgstr "Урду"
msgid "Uzbek"
msgstr "Узбекский"
msgid "Venda"
msgstr "Венда"
msgid "Walloon"
msgstr "Валлонский"
msgid "Walser"
msgstr "Вальзер"
msgid "Wolaytta"
msgstr "Волайтта"
msgid "Wolof"
msgstr "Волоф"
msgid "Xhosa"
msgstr "Коса"
msgid "Yiddish"
msgstr "Идиш"
msgid "Yoruba"
msgstr "Йоруба"
msgid "Cantonese"
msgstr "Кантонский"
msgid "Yau"
msgstr "Яу"
msgid "Moroccan Tamazight"
msgstr "Марокканский тамазигхт"
msgid "Chinese"
msgstr "Китайский"
msgid "Zulu"
msgstr "Зулу"
#: ./locales.csv:1
msgid "Afrikaans"
msgstr "Африкаанс"
#: ./locales.csv:16
msgid "Assamese"
msgstr "Ассамский"
#: ./locales.csv:17
msgid "Azerbaijani"
msgstr "Азербайджанский"
#: ./locales.csv:18
msgid "Belarusian"
msgstr "Белорусский"
#: ./locales.csv:19
msgid "Bulgarian"
msgstr "Болгарский"
#: ./locales.csv:20
msgid "Bengali"
msgstr "Бенгальский"
#: ./locales.csv:21
msgid "Bosnian"
msgstr "Боснийский"
#: ./locales.csv:24
msgid "Danish"
msgstr "Датский"
#: ./locales.csv:31
msgid "Greek"
msgstr "Греческий"
#: ./locales.csv:66
msgid "Estonian"
msgstr "Эстонский"
#: ./locales.csv:67
msgid "Finnish"
msgstr "Финский"
#: ./locales.csv:68
msgid "French"
msgstr "Французский"
#: ./locales.csv:73
msgid "Gujarati"
msgstr "Гуджарати"
#: ./locales.csv:74
msgid "Hebrew"
msgstr "Иврит"
#: ./locales.csv:75
msgid "Hindi"
msgstr "Хинди"
#: ./locales.csv:76
msgid "Croatian"
msgstr "Хорватский"
#: ./locales.csv:77
msgid "Hungarian"
msgstr "Венгерский"
#: ./locales.csv:78
msgid "Armenian"
msgstr "Армянский"
#: ./locales.csv:79
msgid "Indonesian"
msgstr "Индонезийский"
#: ./locales.csv:80
msgid "Icelandic"
msgstr "Исландский"
#: ./locales.csv:81
msgid "Italian"
msgstr "Итальянский"
#: ./locales.csv:83
msgid "Japanese"
msgstr "Японский"
#: ./locales.csv:84
msgid "Georgian"
msgstr "Грузинский"
#: ./locales.csv:85
msgid "Kazakh"
msgstr "Казахский"
#: ./locales.csv:86
msgid "Kannada"
msgstr "Каннада"
#: ./locales.csv:88
msgid "Kashmiri"
msgstr "Кашмири"
#: ./locales.csv:91
msgid "Kirghiz"
msgstr "Киргизский"
#: ./locales.csv:92
msgid "Lithuanian"
msgstr "Литовский"
#: ./locales.csv:93
msgid "Latvian"
msgstr "Латышский"
#: ./locales.csv:94
msgid "Macedonian"
msgstr "Македонский"
#: ./locales.csv:95
msgid "Malayalam"
msgstr "Малаялам"
#: ./locales.csv:96
msgid "Marathi"
msgstr "Маратхи"
#: ./locales.csv:97
msgid "Malay"
msgstr "Малайский"
#: ./locales.csv:99
msgid "Bokmål"
msgstr "Букмол"
#: ./locales.csv:102
msgid "Nynorsk"
msgstr "Нюнорск"
#: ./locales.csv:103
msgid "Oriya"
msgstr "Ория"
#: ./locales.csv:105
msgid "Polish"
msgstr "Польский"
#: ./locales.csv:106
msgid "Portuguese"
msgstr "Португальский"
#: ./locales.csv:108
msgid "Romanian"
msgstr "Румынский"
#: ./locales.csv:109
msgid "Russian"
msgstr "Русский"
#: ./locales.csv:111
msgid "Sanskrit"
msgstr "Санскрит"
#: ./locales.csv:112
msgid "Slovak"
msgstr "Словацкий"
#: ./locales.csv:113
msgid "Slovenian"
msgstr "Словенский"
#: ./locales.csv:115
msgid "Serbian"
msgstr "Сербский"
#: ./locales.csv:121
msgid "Telugu"
msgstr "Телугу"
#: ./locales.csv:122
msgid "Thai"
msgstr "Тайский"
#: ./locales.csv:124
msgid "Ukrainian"
msgstr "Украинский"
#: ./locales.csv:125
msgid "Vietnamese"
msgstr "Вьетнамский"
#: ./locales.csv:126
msgid "Simplified Chinese"
msgstr "Упрощенный китайский"
#: ./locales.csv:127
msgid "Traditional Chinese"
msgstr "Традиционный китайский"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -17,6 +17,8 @@ add_library(${PROJECT_NAME} SHARED
libublsettings-dictionary.c libublsettings-dictionary.c
libublsettings-char.c libublsettings-char.c
libublsettings-file.c libublsettings-file.c
libublsettings-hash.c
libublsettings-locale.c
libublsettings.h) libublsettings.h)

@ -300,6 +300,7 @@ char *yon_char_replace_single(char *source, char *find, char *replace){
char **yon_char_parse(const char * parameters, int *size, char * divider){ char **yon_char_parse(const char * parameters, int *size, char * divider){
*size=0; *size=0;
if (parameters&&!yon_char_is_empty(divider)){ if (parameters&&!yon_char_is_empty(divider)){
if (!strstr(parameters,divider)) return yon_char_parsed_new(size,parameters,NULL);
char **string=NULL; char **string=NULL;
char *paramline=yon_char_new(parameters); char *paramline=yon_char_new(parameters);
char *param = strstr(paramline,divider); char *param = strstr(paramline,divider);
@ -309,7 +310,7 @@ char **yon_char_parse(const char * parameters, int *size, char * divider){
string[(*size)] = malloc(cur_size+1); string[(*size)] = malloc(cur_size+1);
memset(string[(*size)],0,cur_size+1); memset(string[(*size)],0,cur_size+1);
memcpy(string[(*size)],paramline,cur_size); memcpy(string[(*size)],paramline,cur_size);
memcpy(paramline,paramline+strlen(string[(*size)])+strlen(divider),strlen(param)); memmove(paramline,paramline+strlen(string[(*size)])+strlen(divider),strlen(param) - strlen(divider) + 1);
// string[(*size)]=yon_char_divide(paramline,strlen(paramline)-strlen(param)); // string[(*size)]=yon_char_divide(paramline,strlen(paramline)-strlen(param));
*size=(*size)+1; *size=(*size)+1;
} }
@ -682,6 +683,20 @@ config_str yon_char_wrap_to_length(char *target, unsigned int length, int *size)
return ret_target; return ret_target;
} }
char *yon_char_get_element(char *target, unsigned int position, char *divider){
if (!yon_char_is_empty(target)&&strstr(target,divider)){
int size;
char *final = NULL;
config_str parsed = yon_char_parse(target,&size,divider);
if (size>=position){
final = yon_char_new(parsed[position]);
}
yon_char_parsed_free(parsed,size);
return final;
}
return NULL;
}
char *yon_char_wrap_to_length_str(char *target, unsigned int length){ char *yon_char_wrap_to_length_str(char *target, unsigned int length){
int size=0; int size=0;
if (!yon_char_is_empty(target)&&strlen(target)>length&&strstr(target," ")){ if (!yon_char_is_empty(target)&&strlen(target)>length&&strstr(target," ")){

@ -1122,7 +1122,7 @@ config_str yon_config_get_save_parameters_by_list(int *size, config_str paramete
} }
} }
if (!found){ if (!found){
if(removed){ if(removed&&temp){
int position = yon_char_parsed_find_element(removed,removed_size,((yon_config_parameter*)temp)->section); int position = yon_char_parsed_find_element(removed,removed_size,((yon_config_parameter*)temp)->section);
if (position>=0){ if (position>=0){
char *string = yon_char_unite((removed)[position]," ",yon_config_parameter_to_string((yon_config_parameter*)temp,0),NULL); char *string = yon_char_unite((removed)[position]," ",yon_config_parameter_to_string((yon_config_parameter*)temp,0),NULL);
@ -1148,10 +1148,11 @@ config_str yon_config_get_save_parameters_by_list(int *size, config_str paramete
return final; return final;
} }
config_str yon_config_get_save_parameters_by_key(int *size, char *parameter,...){ config_str yon_config_get_save_parameters_by_key(int *size,...){
va_list list;
(*size)=0; (*size)=0;
va_start(list,parameter); check_config{
va_list list;
va_start(list,size);
int removed_size; int removed_size;
config_str removed = NULL; config_str removed = NULL;
int updated_size; int updated_size;
@ -1172,12 +1173,14 @@ config_str yon_config_get_save_parameters_by_key(int *size, char *parameter,...)
current = &removed; current = &removed;
current_size = &removed_size; current_size = &removed_size;
break; break;
case 0:
case 1: case 1:
action = "set"; action = "set";
current = &updated; current = &updated;
current_size = &updated_size; current_size = &updated_size;
break; break;
} }
if (!current) continue;
int position = yon_char_parsed_find_element(*current,*current_size,((yon_config_parameter*)temp)->section); int position = yon_char_parsed_find_element(*current,*current_size,((yon_config_parameter*)temp)->section);
if (position>=0){ if (position>=0){
char *string = yon_char_unite((*current)[position]," ",yon_config_parameter_to_string((yon_config_parameter*)temp,0),NULL); char *string = yon_char_unite((*current)[position]," ",yon_config_parameter_to_string((yon_config_parameter*)temp,0),NULL);
@ -1195,6 +1198,23 @@ config_str yon_config_get_save_parameters_by_key(int *size, char *parameter,...)
final = yon_char_parsed_merge(updated,updated_size,removed,removed_size,size); final = yon_char_parsed_merge(updated,updated_size,removed,removed_size,size);
return final; return final;
} }
return NULL;
}
config_str yon_config_find_keys(char *target, int *size){
(*size)=0;
check_config{
config_str final = NULL;
yon_config_parameter *cur = NULL;
for_dictionaries(cur,__yon__config__strings){
if (strstr(cur->key,target)){
yon_char_parsed_add_or_create_if_exists(final,size,cur->key);
}
}
return final;
}
return NULL;
}
config_str yon_config_get_save_parameters(int *size){ config_str yon_config_get_save_parameters(int *size){
check_config{} else return NULL; check_config{} else return NULL;
@ -1243,7 +1263,6 @@ char *yon_config_save_simple(YON_CONFIG_TYPE target, char *path){
if (parameters){ if (parameters){
yon_char_parsed_prepend_strings(parameters,parameters_size,ubconfig_set_command(path)); yon_char_parsed_prepend_strings(parameters,parameters_size,ubconfig_set_command(path));
char *final_command = yon_char_parsed_to_string(parameters,parameters_size,";"); char *final_command = yon_char_parsed_to_string(parameters,parameters_size,";");
printf("%s\n",final_command);
FILE *file = popen(final_command,"r"); FILE *file = popen(final_command,"r");
if (file){ if (file){
int file_size=0; int file_size=0;
@ -1333,14 +1352,12 @@ int yon_config_save_registered(char *path){
for_dictionaries(dct,sections_add){ for_dictionaries(dct,sections_add){
char *command = yon_dictionary_get_data(dct,char*); char *command = yon_dictionary_get_data(dct,char*);
yon_launch(command); yon_launch(command);
printf("%s\n",command);
} }
yon_dictionary_free_all(sections_add,free); yon_dictionary_free_all(sections_add,free);
if (sections_remove) if (sections_remove)
for_dictionaries(dct,sections_remove){ for_dictionaries(dct,sections_remove){
char *command = yon_dictionary_get_data(dct,char*); char *command = yon_dictionary_get_data(dct,char*);
yon_launch(command); yon_launch(command);
printf("%s\n",command);
} }
yon_dictionary_free_all(sections_remove,free); yon_dictionary_free_all(sections_remove,free);
if (sections_add||sections_remove) if (sections_add||sections_remove)

@ -0,0 +1,101 @@
#include "libublsettings.h"
unsigned int yon_str_hash(const char *str) {
unsigned int hash = 5381;
for (; *str != '\0'; str++) {
hash = (hash << 5) + hash + (unsigned char)(*str);
}
return hash;
}
//\
=====================================================================
yon_hash *yon_hash_new(int size, unsigned int(*hash_func)(const char *)){
yon_hash *hash = malloc(sizeof(yon_hash));
memset(hash,0,sizeof(yon_hash));
hash->data = malloc(sizeof(yon_hash_element)*size);
memset(hash->data,0,sizeof(yon_hash_element)*size);
hash->size = size;
hash->hash_func = hash_func;
return hash;
}
yon_hash_element *yon_hash_element_new(const char *key, void *data){
yon_hash_element *element = malloc(sizeof(yon_hash_element));
memset(element,0,sizeof(yon_hash_element));
element->key = yon_char_new(key);
element->data = data;
element->first = (struct yon_hash_element*)element;
return element;
}
int yon_hash_insert(yon_hash *target, const char *key, void *data){
if (target&&target->hash_func&&!yon_char_is_empty(key)&&data){
unsigned int hash = target->hash_func(key)%target->size;
if (target->data&&target->data[hash]){
yon_hash_element *element = yon_hash_element_new(key,data);
yon_hash_element *last = (yon_hash_element *)yon_dictionary_get_last((dictionary*)target->data[hash]);
last->next=(struct yon_hash_element*)element;
element->prev=(struct yon_hash_element*)last;
element->first=(struct yon_hash_element*)last->first;
return 1;
} else {
// target->data[hash] = malloc(sizeof(yon_hash_element*));
target->data[hash] = yon_hash_element_new(key,data);
return 1;
}
}
return 0;
}
int yon_hash_remove(yon_hash *target, const char *key){
if (target&&target->hash_func&&!yon_char_is_empty(key)){
unsigned int hash = target->hash_func(key)%target->size;
if (target->data[hash]){
dictionary *dict = yon_dictionary_get((dictionary**)&target->data[hash],(char*)key);
target->data[hash]=(yon_hash_element*)yon_dictionary_rip(dict);
}
}
return 0;
}
void *yon_hash_lookup(yon_hash *target, const char *key){
if (target&&target->size>0&&!yon_char_is_empty(key)){
unsigned int hash = target->hash_func(key)%target->size;
if (target->data[hash]){
dictionary *dict = yon_dictionary_get((dictionary**)&target->data[hash],(char*)key);
return yon_dictionary_get_data(dict,void*);
}
}
return NULL;
}
int yon_hash_contains(yon_hash *target, const char *key){
if (target&&!yon_char_is_empty(key)){
unsigned int hash = target->hash_func(key)%target->size;
if (target->data[hash]){
if (yon_dictionary_get((dictionary**)&target->data[hash],(char*)key)) return 1;
}
}
return 0;
}
int yon_hash_add(yon_hash *target,const char *key){
if (target&&target->size>0&&!yon_char_is_empty(key)){
unsigned int hash = target->hash_func(key)%target->size;
if (target->data[hash]){
yon_hash_element *element = yon_hash_element_new(key,NULL);
yon_hash_element *last = (yon_hash_element *)yon_dictionary_get_last((dictionary*)target->data[hash]);
last->next=(struct yon_hash_element*)element;
element->prev=(struct yon_hash_element*)last;
element->first=(struct yon_hash_element*)last->first;
return 1;
} else {
target->data = malloc(sizeof(yon_hash_element*));
target->data[0] = yon_hash_element_new(key,NULL);
return 1;
}
}
}

@ -0,0 +1,118 @@
#include "libublsettings.h"
#define locales_path "/usr/share/i18n/locales/"
yon_hash *locales_hash_table = NULL;
struct yon_locale {
char *code;
char *lang_ab;
char *territory;
char *language;
char *lang_name;
char *title;
};
struct yon_locale *yon_lang_new(){
struct yon_locale *cur_locale = malloc(sizeof(struct yon_locale));
memset(cur_locale,0,sizeof(struct yon_locale));
return cur_locale;
}
char *yon_locale_unwrap(char *parameter){
char *final = yon_char_new(parameter);
free(yon_char_divide_search(final,"\"",-1));
char *temp = yon_char_divide_search(final,"\"",-1);
free(final);
final = yon_char_return_if_exist(temp,NULL);
return final;
}
void yon_locale_set(struct yon_locale *target,char *locale_name){
int size;
char *path = yon_char_unite(locales_path,locale_name,NULL);
config_str locale_string = yon_file_open(path,&size);
target->code = yon_char_new(locale_name);
target->lang_ab = yon_char_new(locale_name);
target->territory = yon_char_parsed_check_exist_begins_with(locale_string,size,"territory");
target->language = yon_char_parsed_check_exist_begins_with(locale_string,size,"language");
target->lang_name = yon_char_parsed_check_exist_begins_with(locale_string,size,"lang_name");
target->title = yon_char_parsed_check_exist_begins_with(locale_string,size,"title");
if (!yon_char_is_empty(target->lang_ab)){
char *temp = strstr(target->lang_ab,"_");
if (!yon_char_is_empty(temp)) temp[0]='\0';
}
if (!yon_char_is_empty(target->territory)){
char *temp = yon_locale_unwrap(target->territory);
free(target->territory);
target->territory = yon_char_new(temp);
}
if (!yon_char_is_empty(target->language)){
char *temp = yon_locale_unwrap(target->language);
free(target->language);
target->language = yon_char_new(temp);
}
if (!yon_char_is_empty(target->lang_name)){
char *temp = yon_locale_unwrap(target->lang_name);
free(target->lang_name);
target->lang_name = yon_char_new(temp);
}
if (!yon_char_is_empty(target->title)){
char *temp = yon_locale_unwrap(target->title);
free(target->title);
target->title = yon_char_new(temp);
}
// yon_char_parsed_free(locale_string,size);
free(path);
}
void yon_locale_init(){
int size;
config_str locales_list = yon_dir_get_contents(locales_path,&size);
locales_hash_table = yon_hash_new(size*2,yon_str_hash);
for (int i=0;i<size;i++){
if (!strcmp(locales_list[i],".")||!strcmp(locales_list[i],"..")) continue;
struct yon_locale *cur_locale = yon_lang_new();
yon_locale_set(cur_locale,locales_list[i]);
yon_hash_insert(locales_hash_table,yon_char_new(locales_list[i]),cur_locale);
}
yon_char_parsed_free(locales_list,size);
}
config_str yon_locale_get_all_codes(int *size){
(*size)=0;
config_str final = NULL;
for (int i=0;i<locales_hash_table->size;i++){
if (locales_hash_table->data[i]){
yon_hash_element *dict = NULL;
for_dictionaries(dict,locales_hash_table->data[i]){
yon_char_parsed_add_or_create_if_exists(final,size,dict->key);
}
}
}
return final;
}
char *yon_locale_get_parameter(char *code,enum YON_LOCALE_PARAMETER type){
unsigned int hash = locales_hash_table->hash_func(code)%locales_hash_table->size;
yon_hash_element *data = (yon_hash_element*)yon_dictionary_get((dictionary**)&locales_hash_table->data[hash],code);
struct yon_locale *cur_locale = yon_dictionary_get_data(data,struct yon_locale*);
switch(type){
case YON_LOCALE_LANGUAGE:{
return cur_locale->language;
}break;
case YON_LOCALE_LANG_NAME:{
return cur_locale->lang_name;
}break;
case YON_LOCALE_TERRITORY:{
return cur_locale->territory;
}break;
case YON_LOCALE_LANG_AB:{
return cur_locale->lang_ab;
}break;
case YON_LOCALE_TITLE:{
return cur_locale->title;
}break;
}
}

@ -815,7 +815,7 @@ config_str yon_config_get_load_parameters_by_list(int *size, config_str paramete
config_str yon_config_get_save_parameters_by_list(int *size, config_str parameters, int params_size); config_str yon_config_get_save_parameters_by_list(int *size, config_str parameters, int params_size);
config_str yon_config_get_save_parameters_by_key(int *size, char *parameter,...); config_str yon_config_get_save_parameters_by_key(int *size, ...);
config_str yon_config_get_save_parameters(int *size); config_str yon_config_get_save_parameters(int *size);
@ -863,6 +863,8 @@ int yon_config_parse_parameter(char *parameter,char **key, char **value);
int yon_char_remove_brackets(char *string); int yon_char_remove_brackets(char *string);
char *yon_char_get_element(char *target, unsigned int position, char *divider);
int yon_config_command_get_section_pos(const char *); int yon_config_command_get_section_pos(const char *);
char *yon_config_command_get_section(const char *command); char *yon_config_command_get_section(const char *command);
@ -1053,6 +1055,8 @@ char *yon_config_save_simple(YON_CONFIG_TYPE target, char *path);
[[ deprecated ( "Will be removed soon" ) ]] [[ deprecated ( "Will be removed soon" ) ]]
int yon_config_force_save_registered(char *path); int yon_config_force_save_registered(char *path);
config_str yon_config_find_keys(char *target, int *size);
/**yon_config_get_all(int *size) /**yon_config_get_all(int *size)
* [EN] * [EN]
* *
@ -1094,4 +1098,36 @@ void yon_launch(char *command);
// void *yon_malloc(int size, char *group_key); // void *yon_malloc(int size, char *group_key);
#define LOCALES_DOMAIN_NAME "libublsettings"
enum YON_LOCALE_PARAMETER{
YON_LOCALE_LANGUAGE,
YON_LOCALE_LANG_NAME,
YON_LOCALE_TERRITORY,
YON_LOCALE_LANG_AB,
YON_LOCALE_TITLE
};
typedef struct yon_hash_element{
dictionary_fields(yon_hash_element);
} yon_hash_element;
typedef struct {
yon_hash_element **data;
unsigned int size;
unsigned int(*hash_func)(const char *);
} yon_hash;
unsigned int yon_str_hash(const char *str);
yon_hash *yon_hash_new(int size, unsigned int(*hash_func)(const char *));
int yon_hash_insert(yon_hash *target, const char *key, void *data);
int yon_hash_remove(yon_hash *target, const char *key);
void *yon_hash_lookup(yon_hash *target, const char *key);
int yon_hash_add(yon_hash *target,const char *key);
int yon_hash_contains(yon_hash *target, const char *key);
void yon_locale_init();
config_str yon_locale_get_all_codes(int *size);
char *yon_locale_get_parameter(char *code,enum YON_LOCALE_PARAMETER type);
#endif #endif
Loading…
Cancel
Save