Search.setIndex({"docnames": ["contributor/contributing", "contributor/index", "contributor/policy", "index", "reference/api/modules", "reference/api/oslo_i18n", "reference/index", "user/guidelines", "user/history", "user/index", "user/usage"], "filenames": ["contributor/contributing.rst", "contributor/index.rst", "contributor/policy.rst", "index.rst", "reference/api/modules.rst", "reference/api/oslo_i18n.rst", "reference/index.rst", "user/guidelines.rst", "user/history.rst", "user/index.rst", "user/usage.rst"], "titles": ["Contributing", "Contributing to oslo.i18n", "Policy History", "oslo.i18n \u2013 Oslo Internationalization Utilities", "oslo_i18n", "oslo_i18n package", "oslo.i18n API Reference", "Guidelines for Use in OpenStack", "<no title>", "Using oslo.i18n", "How to Use oslo.i18n in Your Application or Library"], "terms": {"If": [0, 5, 10], "you": [0, 10], "would": 0, "like": 0, "develop": [0, 7], "oslo": [0, 5, 7], "": [0, 7, 10], "librari": [0, 3, 7, 9], "first": 0, "must": [0, 7, 10], "take": [0, 7], "look": [0, 7, 10], "thi": [0, 5, 7, 10], "page": [0, 2, 3, 7], "http": 0, "spec": 0, "openstack": [0, 3, 9, 10], "org": 0, "polici": [0, 1, 3, 10], "html": 0, "follow": [0, 5, 7], "step": 0, "doc": 0, "infra": 0, "manual": 0, "onc": [0, 7], "those": [0, 7, 10], "have": [0, 5, 10], "been": [0, 5, 10], "complet": [0, 5], "chang": [0, 5, 7, 10], "should": [0, 5, 7, 10], "submit": 0, "review": 0, "via": [0, 7, 10], "gerrit": 0, "tool": [0, 7, 10], "workflow": 0, "document": [0, 7], "pull": 0, "request": 0, "through": [0, 10], "github": 0, "ignor": 0, "bug": 0, "file": [0, 7, 10], "launchpad": 0, "net": 0, "i18n": [0, 2, 7], "histori": [1, 3], "discuss": 2, "from": [2, 5, 7, 10], "havana": 2, "summit": 2, "icehous": 2, "juno": 2, "team": [2, 7], "wiki": 2, "loggingstandard": 2, "The": [3, 5, 7, 10], "contain": 3, "work": [3, 5, 7], "featur": 3, "especi": 3, "translat": [3, 4, 5, 6, 9], "text": [3, 7], "string": [3, 5, 7, 10], "an": [3, 7, 9], "applic": [3, 5, 7, 9], "us": [3, 5], "how": [3, 5, 7, 9], "your": [3, 7, 9], "guidelin": [3, 9, 10], "api": [3, 5, 7, 10], "refer": [3, 7, 10], "oslo_i18n": [3, 6, 10], "contribut": 3, "read": 3, "also": [3, 5, 7, 10], "modul": [3, 4, 6, 7, 9], "index": 3, "search": [3, 7], "packag": [4, 6], "submodul": [4, 6], "fixtur": [4, 6], "prefixlazytransl": [4, 5, 6], "setup": [4, 5, 6], "togglelazi": [4, 5, 6], "immedi": [4, 5, 6, 10], "lazi": [4, 5, 6, 9], "log": [4, 6, 9, 10], "translationhandl": [4, 5, 6], "emit": [4, 5, 6, 10], "setformatt": [4, 5, 6], "content": [4, 6], "test": 5, "class": 5, "languag": [5, 7, 9], "none": 5, "local": [5, 10], "base": [5, 7], "prefix": 5, "enabl": [5, 10], "messag": [5, 9], "caus": 5, "support": [5, 7, 10], "replac": [5, 10], "id": 5, "domain": [5, 7, 10], "For": [5, 7, 10], "exampl": [5, 7, 10], "en_u": 5, "about": [5, 7, 10], "someth": 5, "It": [5, 7, 10], "overrid": [5, 10], "avail": [5, 7, 9], "return": [5, 10], "oslo_18n": 5, "get_available_languag": [5, 10], "specifi": [5, 10], "ensur": [5, 7, 10], "were": [5, 7], "lazili": 5, "default": [5, 7, 10], "note": 5, "doe": 5, "unless": 5, "i": [5, 7, 10], "so": [5, 7, 10], "paramet": 5, "list": [5, 7, 10], "prepar": [5, 10], "overridden": 5, "concret": [5, 10], "implement": [5, 10], "_setup": 5, "still": 5, "just": [5, 7, 10], "recommend": [5, 7], "after": [5, 10], "ha": [5, 7, 10], "one": [5, 7, 10], "more": [5, 7, 10], "attribut": 5, "which": [5, 7, 10], "can": [5, 7, 10], "depend": [5, 10], "total": 5, "subclass": 5, "rais": [5, 7, 10], "multipleexcept": 5, "fail": 5, "last": 5, "except": [5, 7, 10], "captur": 5, "within": [5, 10], "setuperror": 5, "1": [5, 7, 10], "3": 5, "revers": 5, "befor": [5, 7], "now": [5, 7], "baseexcept": 5, "caught": 5, "onli": [5, 7, 10], "ar": [5, 7, 10], "wrap": 5, "toggl": 5, "off": 5, "manag": [5, 7], "provid": [5, 7, 10], "method": [5, 10], "creat": [5, 7, 9], "both": [5, 10], "gener": 5, "differ": [5, 7, 10], "type": 5, "code": [5, 7, 10], "mai": [5, 7, 10], "need": [5, 7, 10], "know": 5, "handl": [5, 9], "them": [5, 7], "error": [5, 7, 10], "wsgi": 5, "app": 5, "instead": [5, 7, 10], "global": [5, 10], "flag": 5, "regular": 5, "factori": [5, 10], "msg": [5, 7, 10], "though": 5, "had": [5, 7], "str": 5, "unicod": [5, 10], "input": 5, "option": 5, "includ": [5, 7, 10], "posit": [5, 7], "name": [5, 7, 10], "interpol": [5, 7, 10], "marker": [5, 9, 10], "util": 5, "target": 5, "memoryhandl": 5, "handler": [5, 10], "record": 5, "when": [5, 7, 10], "see": [5, 7], "enable_lazi": [5, 10], "its": 5, "configur": [5, 10], "set": [5, 7], "determin": [5, 10], "logrecord": 5, "object": [5, 7, 9], "forward": 5, "disabl": 5, "convert": [5, 10], "without": 5, "ani": [5, 7], "declar": 5, "conf": 5, "kei": 5, "translatedlog": 5, "handler_translatedlog": 5, "watchedfilehandl": 5, "arg": 5, "var": 5, "formatt": 5, "context": [5, 7], "handler_transl": 5, "zh_cn": 5, "system": [5, 7], "append": 5, "shouldflush": 5, "tell": 5, "u": 5, "call": [5, 7, 10], "flush": 5, "process": 5, "buffer": 5, "fmt": 5, "limit": 7, "capac": 7, "we": 7, "want": [7, 10], "make": 7, "effect": 7, "possibl": [7, 10], "identifi": 7, "most": [7, 10], "all": [7, 10], "user": [7, 10], "mark": 7, "howev": 7, "some": [7, 10], "intern": 7, "signal": 7, "condit": 7, "between": 7, "intend": 7, "present": 7, "do": [7, 10], "neither": 7, "explain": 7, "below": 7, "sometim": 7, "under": 7, "same": 7, "word": 7, "phrase": 7, "translatorfactori": [7, 10], "contextual_form": [7, 10], "And": 7, "_c": [7, 10], "_translat": [7, 10], "In": 7, "item": 7, "count": 7, "plural_form": [7, 10], "_p": [7, 10], "singl": [7, 10], "By": 7, "_": [7, 10], "These": 7, "two": 7, "2": [7, 10], "0": [7, 10], "start": [7, 10], "pike": [7, 10], "seri": [7, 10], "longer": [7, 10], "necessari": [7, 10], "add": [7, 10], "instruct": [7, 10], "new": [7, 10], "remov": [7, 10], "old": [7, 10], "retain": 7, "help": 7, "understand": [7, 10], "exist": 7, "usag": 7, "wa": 7, "drop": 7, "primarili": 7, "feedback": 7, "oper": 7, "thei": [7, 10], "undesir": 7, "becaus": [7, 10], "fragment": 7, "web": 7, "inform": 7, "particular": 7, "therebi": 7, "reduc": 7, "chanc": 7, "find": 7, "email": [7, 10], "thread": [7, 10], "dev": [7, 10], "mail": [7, 10], "detail": [7, 10], "previous": 7, "level": 7, "separ": [7, 10], "catalog": [7, 10], "well": [7, 10], "known": [7, 10], "build": 7, "job": 7, "extract": [7, 10], "sourc": [7, 10], "pass": 7, "info": 7, "_li": 7, "warn": 7, "_lw": 7, "_le": 7, "critic": 7, "_lc": 7, "debug": 7, "never": [7, 10], "perform": 7, "inspect": 7, "specif": [7, 10], "argument": 7, "wrong": [7, 10], "variable_containing_msg": 7, "style": [7, 10], "right": [7, 10], "my": [7, 10], "purpos": 7, "priorit": 7, "import": [7, 9], "load": 7, "everyth": 7, "up": 7, "individu": 7, "expect": 7, "prefer": [7, 10], "face": 7, "even": 7, "go": 7, "version": [7, 10], "anytim": 7, "outsid": [7, 10], "current": 7, "part": [7, 10], "A": [7, 10], "common": 7, "pattern": [7, 10], "defin": [7, 10], "than": [7, 10], "case": [7, 10], "appear": 7, "unfortun": 7, "plain": 7, "There": 7, "localexceptionclass": 7, "occur": 7, "combin": 7, "other": [7, 10], "liter": 7, "partial": 7, "valueerror": 7, "insid": 7, "allow": 7, "account": 7, "grammar": 7, "rule": 7, "left": 7, "v": 7, "render": 7, "factor": 7, "end": 7, "move": 7, "around": 7, "write": 7, "direct": 7, "v1": 7, "v2": 7, "instal": 9, "integr": 9, "hack": 9, "displai": 9, "gettext": [9, 10], "contextu": [9, 10], "form": [9, 10], "plural": [9, 10], "function": [9, 10], "choos": 9, "ad": 9, "variabl": [9, 10], "At": 10, "command": 10, "line": 10, "pip": 10, "To": 10, "project": 10, "e": 10, "g": 10, "myapp": 10, "small": 10, "hold": 10, "instanc": 10, "probabl": 10, "expos": 10, "public": 10, "rather": 10, "_i18n": 10, "indic": 10, "privat": 10, "meant": 10, "own": 10, "py": 10, "primari": 10, "requir": 10, "def": 10, "Then": 10, "rest": 10, "appropri": 10, "each": 10, "some_object": 10, "name_msg": 10, "try": 10, "anexception1": 10, "anexception2": 10, "runtimeerror": 10, "els": 10, "unexpect": 10, "multipl": 10, "valid": 10, "statement": 10, "scan": 10, "builtin": 10, "namespac": 10, "deprec": 10, "modifi": 10, "affect": 10, "interfer": 10, "proper": 10, "lookup": 10, "gettextutil": 10, "describ": 10, "here": 10, "access": 10, "directli": 10, "foo": 10, "bar": 10, "lint": 10, "typic": 10, "complain": 10, "accept": 10, "bypass": 10, "dictat": 10, "our": 10, "check": 10, "tox": 10, "ini": 10, "import_except": 10, "delai": 10, "long": 10, "possibli": 10, "deliv": 10, "wai": 10, "special": 10, "That": 10, "manipul": 10, "concaten": 10, "addit": 10, "restrict": 10, "mean": 10, "cannot": 10, "alreadi": 10, "point": 10, "where": 10, "often": 10, "prior": 10, "being": 10, "trans_msg": 10, "my_local": 10, "sever": 10, "run": 10, "environ": 10, "lc_all": 10, "lc_messag": 10, "former": 10, "prioriti": 10, "directori": 10, "python": 10, "binari": 10, "mo": 10, "given": 10, "path": 10, "localedir": 10, "vari": 10, "distribut": 10, "usr": 10, "share": 10, "store": 10, "locat": 10, "_localedir": 10, "upper": 10, "neutron_localedir": 10, "neutron": 10, "oslo_i18n_localedir": 10, "per": 10, "myapp_localedir": 10, "oslo_policy_localedir": 10}, "objects": {"": [[5, 0, 0, "-", "oslo_i18n"]], "oslo_i18n": [[5, 0, 0, "-", "fixture"], [5, 0, 0, "-", "log"]], "oslo_i18n.fixture": [[5, 1, 1, "", "PrefixLazyTranslation"], [5, 1, 1, "", "ToggleLazy"], [5, 1, 1, "", "Translation"]], "oslo_i18n.fixture.PrefixLazyTranslation": [[5, 2, 1, "", "setUp"]], "oslo_i18n.fixture.ToggleLazy": [[5, 2, 1, "", "setUp"]], "oslo_i18n.fixture.Translation": [[5, 2, 1, "", "immediate"], [5, 2, 1, "", "lazy"]], "oslo_i18n.log": [[5, 1, 1, "", "TranslationHandler"]], "oslo_i18n.log.TranslationHandler": [[5, 2, 1, "", "emit"], [5, 2, 1, "", "setFormatter"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"]}, "titleterms": {"contribut": [0, 1], "oslo": [1, 3, 6, 9, 10], "i18n": [1, 3, 6, 9, 10], "polici": 2, "histori": 2, "internation": 3, "util": 3, "content": [3, 5], "releas": 3, "note": 3, "indic": 3, "tabl": 3, "oslo_i18n": [4, 5], "packag": 5, "submodul": 5, "fixtur": 5, "modul": [5, 10], "log": [5, 7], "api": 6, "refer": 6, "guidelin": 7, "us": [7, 9, 10], "openstack": 7, "gettext": 7, "contextu": 7, "form": 7, "plural": 7, "translat": [7, 10], "marker": 7, "function": 7, "choos": 7, "ad": 7, "variabl": 7, "messag": [7, 10], "how": 10, "your": 10, "applic": 10, "librari": 10, "instal": 10, "creat": 10, "an": 10, "integr": 10, "handl": 10, "hack": 10, "object": 10, "import": 10, "lazi": 10, "avail": 10, "languag": 10, "displai": 10}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"Contributing": [[0, "contributing"]], "Contributing to oslo.i18n": [[1, "contributing-to-oslo-i18n"]], "Policy History": [[2, "policy-history"]], "oslo.i18n \u2013 Oslo Internationalization Utilities": [[3, "oslo-i18n-oslo-internationalization-utilities"]], "Contents": [[3, "contents"]], "Release Notes": [[3, "release-notes"]], "Indices and tables": [[3, "indices-and-tables"]], "oslo_i18n": [[4, "oslo-i18n"]], "oslo_i18n package": [[5, "oslo-i18n-package"]], "Submodules": [[5, "submodules"]], "oslo_i18n.fixture module": [[5, "module-oslo_i18n.fixture"]], "oslo_i18n.log module": [[5, "module-oslo_i18n.log"]], "Module contents": [[5, "module-oslo_i18n"]], "oslo.i18n API Reference": [[6, "oslo-i18n-api-reference"]], "Guidelines for Use in OpenStack": [[7, "guidelines-for-use-in-openstack"]], "Gettext Contextual Form and Plural Form": [[7, "gettext-contextual-form-and-plural-form"]], "Log Translation": [[7, "log-translation"]], "Using a Marker Function": [[7, "using-a-marker-function"]], "Choosing a Marker Function": [[7, "choosing-a-marker-function"]], "Adding Variables to Translated Messages": [[7, "adding-variables-to-translated-messages"]], "Using oslo.i18n": [[9, "using-oslo-i18n"]], "How to Use oslo.i18n in Your Application or Library": [[10, "how-to-use-oslo-i18n-in-your-application-or-library"]], "Installing": [[10, "installing"]], "Creating an Integration Module": [[10, "creating-an-integration-module"]], "Handling hacking Objections to Imports": [[10, "handling-hacking-objections-to-imports"]], "Lazy Translation": [[10, "lazy-translation"]], "Translating Messages": [[10, "translating-messages"]], "Available Languages": [[10, "available-languages"]], "Displaying translated messages": [[10, "displaying-translated-messages"]]}, "indexentries": {"prefixlazytranslation (class in oslo_i18n.fixture)": [[5, "oslo_i18n.fixture.PrefixLazyTranslation"]], "togglelazy (class in oslo_i18n.fixture)": [[5, "oslo_i18n.fixture.ToggleLazy"]], "translation (class in oslo_i18n.fixture)": [[5, "oslo_i18n.fixture.Translation"]], "translationhandler (class in oslo_i18n.log)": [[5, "oslo_i18n.log.TranslationHandler"]], "emit() (oslo_i18n.log.translationhandler method)": [[5, "oslo_i18n.log.TranslationHandler.emit"]], "immediate() (oslo_i18n.fixture.translation method)": [[5, "oslo_i18n.fixture.Translation.immediate"]], "lazy() (oslo_i18n.fixture.translation method)": [[5, "oslo_i18n.fixture.Translation.lazy"]], "module": [[5, "module-oslo_i18n"], [5, "module-oslo_i18n.fixture"], [5, "module-oslo_i18n.log"]], "oslo_i18n": [[5, "module-oslo_i18n"]], "oslo_i18n.fixture": [[5, "module-oslo_i18n.fixture"]], "oslo_i18n.log": [[5, "module-oslo_i18n.log"]], "setformatter() (oslo_i18n.log.translationhandler method)": [[5, "oslo_i18n.log.TranslationHandler.setFormatter"]], "setup() (oslo_i18n.fixture.prefixlazytranslation method)": [[5, "oslo_i18n.fixture.PrefixLazyTranslation.setUp"]], "setup() (oslo_i18n.fixture.togglelazy method)": [[5, "oslo_i18n.fixture.ToggleLazy.setUp"]]}})