Browse Source

i18n

main
Inhji Y. 2 months ago
parent
commit
55e9710e90
8 changed files with 85 additions and 12 deletions
  1. +0
    -0
      data/finder.appdata.xml.in
  2. +0
    -0
      data/finder.desktop.in
  3. +24
    -11
      meson.build
  4. +1
    -0
      po/LINGUAS
  5. +3
    -0
      po/POTFILES
  6. +52
    -0
      po/de.inhji.finder.pot
  7. +4
    -0
      po/meson.build
  8. +1
    -1
      src/Application.vala

data/finder.appdata.xml → data/finder.appdata.xml.in View File


data/finder.desktop → data/finder.desktop.in View File


+ 24
- 11
meson.build View File

@ -1,6 +1,12 @@
# project name and programming language
project('de.inhji.finder', 'vala', 'c')
# Include the translations module
i18n = import('i18n')
# Set our translation domain
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')
# Create a new executable, list the files we want to compile, list the dependencies we need, and install
executable(
meson.project_name(),
@ -11,16 +17,23 @@ executable(
install: true
)
# Install our .desktop file so the Applications Menu will see it
install_data(
join_paths('data', 'finder.desktop'),
install_dir: join_paths(get_option('datadir'), 'applications'),
rename: meson.project_name() + '.desktop'
#Translate and install our .desktop file
i18n.merge_file(
input: join_paths('data', 'finder.desktop.in'),
output: meson.project_name() + '.desktop',
po_dir: join_paths(meson.source_root(), 'po'),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
#Translate and install our .appdata file
i18n.merge_file(
input: join_paths('data', 'finder.appdata.xml.in'),
output: meson.project_name() + '.appdata.xml',
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
# Install our .appdata.xml file so AppCenter will see it
install_data(
join_paths('data', 'finder.appdata.xml'),
install_dir: join_paths(get_option('datadir'), 'metainfo'),
rename: meson.project_name() + '.appdata.xml'
)
subdir('po')

+ 1
- 0
po/LINGUAS View File

@ -0,0 +1 @@
de

+ 3
- 0
po/POTFILES View File

@ -0,0 +1,3 @@
src/Application.vala
data/finder.desktop.in
data/finder.appdata.xml.in

+ 52
- 0
po/de.inhji.finder.pot View File

@ -0,0 +1,52 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the de.inhji.finder package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: de.inhji.finder\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-06 11:49+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/Application.vala:19
msgid "Hello Again World!"
msgstr ""
#: data/finder.desktop.in:3 data/finder.appdata.xml.in:6
msgid "Finder"
msgstr ""
#: data/finder.desktop.in:4
msgid "Finder App"
msgstr ""
#: data/finder.desktop.in:5
msgid "Proves that we can use Vala and Gtk"
msgstr ""
#: data/finder.desktop.in:8
msgid "application-default-icon"
msgstr ""
#: data/finder.desktop.in:10
msgid "Hello;World;Example;"
msgstr ""
#: data/finder.appdata.xml.in:7
msgid "Find everything, do everything!"
msgstr ""
#: data/finder.appdata.xml.in:9
msgid ""
"A quick summary of your app's main selling points and features. Just a "
"couple sentences per paragraph is best."
msgstr ""

+ 4
- 0
po/meson.build View File

@ -0,0 +1,4 @@
i18n.gettext(meson.project_name(),
args: '--directory=' + meson.source_root(),
preset: 'glib'
)

+ 1
- 1
src/Application.vala View File

@ -16,7 +16,7 @@ namespace Vala {
title = "Finder!"
};
var label = new Gtk.Label("Hello Again World!");
var label = new Gtk.Label(_("Hello Again World!"));
main_window.add(label);
main_window.show_all();


Loading…
Cancel
Save