diff --git a/README.md b/README.md index 2247fc5..1b80ba4 100644 --- a/README.md +++ b/README.md @@ -16,16 +16,16 @@ ### Структура каталогов -Файлы ресурсов рекомендуется хранить отдельно от исходников, чтобы ресурсы, описанные через класс (.os) не подключались самостоятельно в ваше приложение. Структуру каталогов можно использовать следующую: +Рекомендуемая структура хранения файлов ресурсов: ``` ... -├── src -└── locales/ - ├── ru/ - ├── en/ - ├── es/ - └── ... +src/ + └── locales/ + ├── ru/ + ├── en/ + ├── es/ + └── ... ``` ### Правила наименования файлов ресурсов @@ -178,7 +178,7 @@ ./src/main.os ``` bsl -ПутьКРесурсам = Новый Файл(ОбъединитьПути(ТекущийСценарий().Каталог, "../locales")).ПолноеИмя; +ПутьКРесурсам = ОбъединитьПути(ТекущийСценарий().Каталог, "locales"); МенеджерРесурсовЛокализации.ДобавитьКаталог(ПутьКРесурсам); ``` diff --git a/examples/src/main.os b/examples/main.os similarity index 91% rename from examples/src/main.os rename to examples/main.os index cc00a67..c00e9c1 100644 --- a/examples/src/main.os +++ b/examples/main.os @@ -3,7 +3,7 @@ Процедура ПодключитьКаталогРесурсов() - ПутьКРесурсам = Новый Файл(ОбъединитьПути(ТекущийСценарий().Каталог, "../locales")).ПолноеИмя; + ПутьКРесурсам = ОбъединитьПути(ТекущийСценарий().Каталог, "locales"); МенеджерРесурсовЛокализации.ДобавитьКаталог(ПутьКРесурсам); КонецПроцедуры diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru.os" "b/tests/locales/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru.os" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru.os" rename to "tests/locales/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru.os" diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru_RU.os" "b/tests/locales/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru_RU.os" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru_RU.os" rename to "tests/locales/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru_RU.os" diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru_RU.properties" "b/tests/locales/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru_RU.properties" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru_RU.properties" rename to "tests/locales/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_ru_RU.properties" diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270\320\232\320\276\320\274\320\260\320\275\320\264_ru_RU.properties" "b/tests/locales/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270\320\232\320\276\320\274\320\260\320\275\320\264_ru_RU.properties" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270\320\232\320\276\320\274\320\260\320\275\320\264_ru_RU.properties" rename to "tests/locales/ru/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270\320\232\320\276\320\274\320\260\320\275\320\264_ru_RU.properties" diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270.os" "b/tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270.os" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270.os" rename to "tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270.os" diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_de.properties" "b/tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_de.properties" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_de.properties" rename to "tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_de.properties" diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_en_UK.os" "b/tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_en_UK.os" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_en_UK.os" rename to "tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_en_UK.os" diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_en_US.properties" "b/tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_en_US.properties" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_en_US.properties" rename to "tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270_en_US.properties" diff --git "a/tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270\320\232\320\276\320\274\320\260\320\275\320\264_en.properties" "b/tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270\320\232\320\276\320\274\320\260\320\275\320\264_en.properties" similarity index 100% rename from "tests/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270\320\232\320\276\320\274\320\260\320\275\320\264_en.properties" rename to "tests/locales/\320\240\320\265\321\201\321\203\321\200\321\201\321\213\320\233\320\276\320\272\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320\270\320\232\320\276\320\274\320\260\320\275\320\264_en.properties" diff --git "a/tests/\320\242\320\265\321\201\321\202\321\213.os" "b/tests/\320\242\320\265\321\201\321\202\321\213.os" index 379fab9..cd70c48 100644 --- "a/tests/\320\242\320\265\321\201\321\202\321\213.os" +++ "b/tests/\320\242\320\265\321\201\321\202\321\213.os" @@ -2,7 +2,7 @@ #Использовать "../src" Процедура ПередЗапускомТестов() Экспорт - МенеджерРесурсовЛокализации.ДобавитьКаталог("tests/РесурсыЛокализации"); + МенеджерРесурсовЛокализации.ДобавитьКаталог("tests/locales"); КонецПроцедуры Процедура ПередЗапускомТеста() Экспорт