当前位置: 首页>>代码示例>>Python>>正文


Python KAboutData.setTranslator方法代码示例

本文整理汇总了Python中PyKDE4.kdecore.KAboutData.setTranslator方法的典型用法代码示例。如果您正苦于以下问题:Python KAboutData.setTranslator方法的具体用法?Python KAboutData.setTranslator怎么用?Python KAboutData.setTranslator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyKDE4.kdecore.KAboutData的用法示例。


在下文中一共展示了KAboutData.setTranslator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: make_about_data

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import setTranslator [as 别名]
def make_about_data(description):
    """
    Create an about data object describing synaptiks.

    ``description`` is a :class:`~PyKDE4.kdecore.KLocalizedString` containing a
    description for the specific part of synaptiks, the created about data
    object should describe.

    Return a :class:`~PyKDE4.kdecore.KAboutData` object with the given
    ``description``.
    """
    about = KAboutData(
        b'synaptiks', '', ki18nc('Program name', 'synaptiks'),
        str(synaptiks.__version__), description, KAboutData.License_BSD,
        ki18nc('About data copyright',
               # KLocalizedString doesn't deal well with unicode
               b'Copyright © 2009, 2010, 2011 Sebastian Wiesner'))
    about.setCustomAuthorText(
        ki18nc('custom author text plain text',
               'Please report bugs to the issue tracker at %1').subs(
            synaptiks.ISSUE_TRACKER_URL),
        ki18nc('@info custom author text rich text',
               'Please report bugs to the '
               '<link url="%1">issue tracker</link>.').subs(
            synaptiks.ISSUE_TRACKER_URL))
    about.setHomepage(synaptiks.WEBSITE_URL)
    about.setOrganizationDomain('lunaryorn.de')

    about.setTranslator(ki18nc('NAME OF TRANSLATORS', 'Your names'),
                        ki18nc('EMAIL OF TRANSLATORS', 'Your emails'))
    about.addAuthor(ki18nc('author name', 'Sebastian Wiesner'),
                    ki18nc('author task', 'Maintainer'),
                    '[email protected]')
    about.addCredit(ki18nc('credit name', 'Valentyn Pavliuchenko'),
                    ki18nc('credit task', 'Debian packaging, russian '
                           'translation, bug reporting and testing'),
                    '[email protected]')
    return about
开发者ID:adaptee,项目名称:synaptiks,代码行数:40,代码来源:__init__.py

示例2: or

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import setTranslator [as 别名]
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#

# PyKDE
from PyKDE4.kdecore import KAboutData, ki18n, ki18nc

# Application Data
appName     = "system-manager"
modName     = "systemmanager"
programName = ki18n("System Manager")
version     = "0.9.7"
description = ki18n("System Manager")
license     = KAboutData.License_GPL
copyright   = ki18n("(c) 2009-2010 TUBITAK/UEKAE")
text        = ki18n(None)
homePage    = "http://www.pardus.org.tr/eng/projects"
bugEmail    = "[email protected]"
catalog     = appName
aboutData   = KAboutData(appName, catalog, programName, version, description, license, copyright, text, homePage, bugEmail)

# Author(s)
aboutData.addAuthor(ki18n("Bahadır Kandemir"), ki18n("Current Maintainer"))
aboutData.setTranslator(ki18nc("NAME OF TRANSLATORS", "Your names"), ki18nc("EMAIL OF TRANSLATORS", "Your emails"))

# Use this if icon name is different than appName
aboutData.setProgramIconName("preferences-other")
开发者ID:dhirajkhatiwada1,项目名称:uludag,代码行数:32,代码来源:about.py

示例3: ki18n

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import setTranslator [as 别名]
appName = "frescobaldi"
catalog = appName
programName = ki18n("Frescobaldi")
version = "@[email protected]"
description = ki18n("LilyPond Music Editor")
license = KAboutData.License_GPL
copyright = ki18n("Copyright (c) 2008-2010, Wilbert Berendsen")
text = KLocalizedString()
homepage = "http://www.frescobaldi.org/"
bugs = "[email protected]"

aboutData = KAboutData(appName, catalog, programName, version, description, license, copyright, text, homepage, bugs)

aboutData.setTranslator(
    ki18nc("NAME OF TRANSLATORS", "Your name"), ki18nc("EMAIL OF TRANSLATORS", "[email protected]")
)

KCmdLineArgs.init(list(sys.argv), aboutData)
KComponentData(aboutData).dirs().addPrefix("@[email protected]")

options = KCmdLineOptions()
options.add("start <session>", ki18n("Session to start"))
options.add("n").add("new", ki18n("Start a new instance"))
options.add("e").add("encoding <enc>", ki18n("Encoding to use"))
options.add("l").add("line <num>", ki18n("Line number to go to, starting at 1"))
options.add("c").add("column <num>", ki18n("Column to go to, starting at 0"))
options.add("smart", ki18n("Try to use smart line and column numbers"))
options.add("+files", ki18n("LilyPond files to open, may also be textedit URLs"))
KCmdLineArgs.addCmdLineOptions(options)
开发者ID:Alwnikrotikz,项目名称:lilykde,代码行数:31,代码来源:frescobaldi.py


注:本文中的PyKDE4.kdecore.KAboutData.setTranslator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。