Add gtk125
This commit is contained in:
parent
88d1b20770
commit
af6ae70796
|
@ -0,0 +1,43 @@
|
|||
# Project for gettext i18n test
|
||||
project('gtk125-i18n','cpp',
|
||||
version: '1.0.0',
|
||||
license: 'GPL3+',
|
||||
default_options : ['c_std=c17', 'cpp_std=c++17'])
|
||||
|
||||
# Compile resources
|
||||
gnome = import('gnome')
|
||||
|
||||
resources = gnome.compile_resources(
|
||||
'my_resources', 'res/gtk125.gresource.xml',
|
||||
source_dir: 'res',
|
||||
c_name: 'resources'
|
||||
)
|
||||
|
||||
# Use i18n module for gettext
|
||||
i18n = import('i18n')
|
||||
|
||||
gettext_package = 'gtk125'
|
||||
add_project_arguments('-DGETTEXT_PACKAGE=' + gettext_package, language: 'cpp')
|
||||
|
||||
# locale directory
|
||||
subdir('po')
|
||||
|
||||
# Add custom include directories
|
||||
include_dir = include_directories('..')
|
||||
|
||||
# Import Gtkmm
|
||||
gtk = dependency('gtkmm-3.0')
|
||||
|
||||
# Sources
|
||||
src = ['src/main.cc','src/MyPrefs.cc','src/MyWin.cc', '../cfgfile/cfgfile.cc']
|
||||
|
||||
# For windows, add a icon resource
|
||||
if host_machine.system() == 'windows'
|
||||
win=import('windows')
|
||||
icon_res=win.compile_resources('../icon.rc')
|
||||
executable('gtk125-i18n', src, resources, icon_res, dependencies : gtk,
|
||||
include_directories: include_dir)
|
||||
else
|
||||
executable('gtk125-i18n', src, resources, dependencies : gtk,
|
||||
include_directories: include_dir)
|
||||
endif
|
|
@ -0,0 +1,2 @@
|
|||
# Please keep this list sorted alphabetically
|
||||
zh_CN
|
|
@ -0,0 +1,5 @@
|
|||
# List of source files containing translatable strings.
|
||||
# Please keep this file in alphabetical order.
|
||||
res/prefs_stack.ui
|
||||
src/MyPrefs.cc
|
||||
src/MyWin.cc
|
|
@ -0,0 +1 @@
|
|||
src/main.cc
|
|
@ -0,0 +1,5 @@
|
|||
i18n = import('i18n')
|
||||
i18n.gettext(
|
||||
'gtk125',
|
||||
preset:'glib',
|
||||
)
|
|
@ -1,43 +0,0 @@
|
|||
#: MyPrefs.cc:20 MyWin.cc:22
|
||||
msgid "Window Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:52
|
||||
msgid "Default Backgrounds"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:58
|
||||
msgid "User's Home"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:64
|
||||
msgid "User's Pictures Directory"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:70
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:75
|
||||
msgid "Images"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:131
|
||||
msgid "Current Config"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:144
|
||||
msgid "Add a folder"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:145
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: MyPrefs.cc:145
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: MyWin.cc:10
|
||||
msgid "Background Preferences Test"
|
||||
msgstr ""
|
|
@ -0,0 +1,68 @@
|
|||
#: MyPrefs.cc:20 MyWin.cc:22
|
||||
msgid "Window Preferences"
|
||||
msgstr "首选项"
|
||||
|
||||
#: MyPrefs.cc:52
|
||||
msgid "Default Backgrounds"
|
||||
msgstr "默认壁纸"
|
||||
|
||||
#: MyPrefs.cc:58
|
||||
msgid "User's Home"
|
||||
msgstr "主目录"
|
||||
|
||||
#: MyPrefs.cc:64
|
||||
msgid "User's Pictures Directory"
|
||||
msgstr "图片"
|
||||
|
||||
#: MyPrefs.cc:70
|
||||
msgid "Name"
|
||||
msgstr "名称"
|
||||
|
||||
#: MyPrefs.cc:75
|
||||
msgid "Images"
|
||||
msgstr "图像"
|
||||
|
||||
#: MyPrefs.cc:131
|
||||
msgid "Current Config"
|
||||
msgstr "当前设置"
|
||||
|
||||
#: MyPrefs.cc:144
|
||||
msgid "Add a folder"
|
||||
msgstr "添加文件夹"
|
||||
|
||||
#: MyPrefs.cc:145
|
||||
msgid "OK"
|
||||
msgstr "确定"
|
||||
|
||||
#: MyPrefs.cc:145
|
||||
msgid "Cancel"
|
||||
msgstr "取消"
|
||||
|
||||
#: MyWin.cc:10
|
||||
msgid "Background Preferences Test"
|
||||
msgstr ""
|
||||
|
||||
#: prefs_stack.ui:57
|
||||
msgid "Background Preferences"
|
||||
msgstr "背景首选项"
|
||||
|
||||
#: prefs_stack.ui:120
|
||||
msgid "Use default window size"
|
||||
msgstr "使用默认窗口大小"
|
||||
|
||||
#: prefs_stack.ui:136
|
||||
msgid "User defined window size"
|
||||
msgstr "用户自定义窗口大小"
|
||||
|
||||
#: prefs_stack.ui:231
|
||||
msgid "Apply"
|
||||
msgstr "应用"
|
||||
|
||||
#: prefs_stack.ui:246
|
||||
msgid "Get Current"
|
||||
msgstr "获取当前配置"
|
||||
|
||||
#: prefs_stack.ui:282
|
||||
msgid "Window Size Config"
|
||||
msgstr "窗口大小首选项"
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="org/gtk/daleclack">
|
||||
<file>icons/16x16/actions/list-add.svg</file>
|
||||
<file>icons/16x16/actions/list-remove.svg</file>
|
||||
<file>icons/scalable/status/display_prefs.svg</file>
|
||||
<file>folder-images.svg</file>
|
||||
<file>folder.svg</file>
|
||||
<file>image_file.svg</file>
|
||||
<file preprocess="xml-stripblanks">prefs_stack.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
int main(int argc,char ** argv){
|
||||
// Initalize gettext
|
||||
//setlocale(LC_ALL,"");
|
||||
bindtextdomain(GETTEXT_PACKAGE, PROGRAMNAME_LOCALEDIR);
|
||||
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain(GETTEXT_PACKAGE);
|
||||
|
|
Loading…
Reference in New Issue