# HG changeset patch # User Thomas De Schampheleire # Date 2017-06-17 19:53:24 # Node ID f2f7a8c1281ed13f324007561f7f5ff3b98b361e # Parent 3b29103657df2ef72dcccf9b7981896ae87046a2 i18n: use TG2 compatible settings names i18n.lang and i18n.enabled Following changes are made: - Remove list of available translations: severely outdated and hard to maintain. - Replace lang with i18n.lang, reasons: - Follow TurboGears2 conventions - Align with 'i18n.enabled' which cannot be shortened - Scoped settings provide grouping and are more clear The old 'lang' is still recognized though, so no upgrade issue. - Introduce/document i18n.enabled Comments are intentionally kept concise in favor of the documentation. diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -180,9 +180,13 @@ use = egg:kallithea full_stack = true static_files = true -## Available Languages: -## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW -lang = + +## Internationalization (see setup documentation for details) +## By default, the language requested by the browser is used if available. +#i18n.enable = false +## Fallback language, empty for English (valid values are the names of subdirectories in kallithea/i18n): +i18n.lang = + cache_dir = %(here)s/data index_dir = %(here)s/data/index diff --git a/kallithea/lib/paster_commands/template.ini.mako b/kallithea/lib/paster_commands/template.ini.mako --- a/kallithea/lib/paster_commands/template.ini.mako +++ b/kallithea/lib/paster_commands/template.ini.mako @@ -181,9 +181,13 @@ use = egg:kallithea full_stack = true static_files = true -<%text>## Available Languages: -<%text>## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW -lang = + +<%text>## Internationalization (see setup documentation for details) +<%text>## By default, the language requested by the browser is used if available. +#i18n.enable = false +<%text>## Fallback language, empty for English (valid values are the names of subdirectories in kallithea/i18n): +i18n.lang = + cache_dir = %(here)s/data index_dir = %(here)s/data/index diff --git a/kallithea/tests/test.ini b/kallithea/tests/test.ini --- a/kallithea/tests/test.ini +++ b/kallithea/tests/test.ini @@ -177,9 +177,13 @@ use = egg:kallithea full_stack = true static_files = true -## Available Languages: -## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW -lang = + +## Internationalization (see setup documentation for details) +## By default, the language requested by the browser is used if available. +#i18n.enable = false +## Fallback language, empty for English (valid values are the names of subdirectories in kallithea/i18n): +i18n.lang = + #cache_dir = %(here)s/data cache_dir = %(here)s/../../data/test/cache #index_dir = %(here)s/data/index