macos“.localized”本地化文件夹名


mac-localized的Python项目详细描述

安装
$ [sudo] pip install mac-localized

工作原理
Release Notes.localized/
    .localized/
        en.strings
        de.strings
        ja.strings

.strings

"Release Notes" = "Localized name";

函数

function ^{}
^{} return path with ^{} postfix
^{} return translation
^{} return dictionary with keys as languages and translations with values
^{} mkdir (if not exists), write translations and return folder fullpath
^{} return folder name without ^{} prefix
^{} rm .localized/ lang files or .localized/ folder
^{} update folder translations
^{} return a list with ^{} files
^{} return dictionary with keys as languages and translations with values

示例

>>> import mac_localized
>>> mac_localized.mkdir("folder",ru="ru translation",de="de translation")
'folder.localized'

>>> mac_localized.load("folder")
{'ru':'ru translation','de':'de translation'}

>>> mac_localized.update("folder",ru="new ru translation",de="new de translation")

>>> mac_localized.get("folder","ru")
'new ru translation'

>>> mac_localized.rm("folder",["ru"])
>>> mac_localized.rm("folder")  # rm all localizations

链接

python-readme-generator

推荐PyPI第三方库


热门话题
damefunnest 媒体 typ cve smarkets pyi libaray spidermonkey 底座 verb aging allocation cavoke 图片 xml x264 boat crabby netcup rand openbsd pyp2rpm mynt krak pstr protobufs dti 量子 方括号 todotxt ankiconnect pytenable chicago monke wasm lever openstf narcissus gurobipy tablib kmod lalsuite part3 quil joe 密码文件 mics 丝板 字母 lch