Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zathura
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
110
Issues
110
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwmt
zathura
Commits
9ac4bdf0
Commit
9ac4bdf0
authored
Mar 04, 2012
by
Sebastian Ramacher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A first step towards localization.
parent
51d927c6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
139 additions
and
9 deletions
+139
-9
Makefile
Makefile
+5
-0
config.mk
config.mk
+4
-4
main.c
main.c
+6
-0
po/.gitignore
po/.gitignore
+2
-0
po/Makefile
po/Makefile
+40
-0
po/de_DE.po
po/de_DE.po
+38
-0
po/zathura.pot
po/zathura.pot
+38
-0
zathura.c
zathura.c
+6
-5
No files found.
Makefile
View file @
9ac4bdf0
...
...
@@ -21,6 +21,7 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCE))
DOBJECTS
=
$(
patsubst
%.c, %.do,
$(SOURCE)
)
all
:
options ${PROJECT}
$(MAKE)
-C
po
options
:
@
echo
${PROJECT}
build options:
...
...
@@ -60,6 +61,7 @@ clean:
${DOBJECTS}
${PROJECT}
-debug
.depend
${PROJECT}
.pc doc version.h
\
*
gcda
*
gcno
$(PROJECT)
.info gcov
$(QUIET)
make
-C
tests clean
$(QUIET)
make
-C
po clean
${PROJECT}-debug
:
${DOBJECTS}
$(ECHO)
CC
-o
$@
...
...
@@ -89,12 +91,14 @@ test: ${OBJECTS}
dist
:
clean
$(QUIET)
mkdir
-p
${PROJECT}
-
${VERSION}
$(QUIET)
mkdir
-p
${PROJECT}
-
${VERSION}
/tests
$(QUIET)
mkdir
-p
${PROJECT}
-
${VERSION}
/po
$(QUIET)
cp
LICENSE Makefile config.mk common.mk README AUTHORS Doxyfile
\
${PROJECT}
.1.rst
${PROJECT}
rc.5.rst
${OSOURCE}
${HEADER}
${PROJECT}
.pc.in
\
${PROJECT}
.desktop version.h.in database-
*
.c
\
${PROJECT}
-
${VERSION}
$(QUIET)
cp
tests/Makefile tests/config.mk tests/
*
.c
\
${PROJECT}
-
${VERSION}
/tests
$(QUIET)
cp
po/Makefile po/
*
.po
${PROJECT}
-
${VERSION}
/po
$(QUIET)
tar
-cf
${PROJECT}
-
${VERSION}
.tar
${PROJECT}
-
${VERSION}
$(QUIET)
gzip
${PROJECT}
-
${VERSION}
.tar
$(QUIET)
rm
-rf
${PROJECT}
-
${VERSION}
...
...
@@ -134,6 +138,7 @@ install: all ${PROJECT}.pc
$(ECHO)
installing pkgconfig file
$(QUIET)
mkdir
-p
${DESTDIR}${PREFIX}
/lib/pkgconfig
$(QUIET)
cp
-f
${PROJECT}
.pc
${DESTDIR}${PREFIX}
/lib/pkgconfig
$(MAKE)
-C
po
install
uninstall
:
$(ECHO)
removing executable file
...
...
config.mk
View file @
9ac4bdf0
...
...
@@ -14,12 +14,12 @@ ZATHURA_GTK_VERSION ?= 2
PREFIX
?=
/usr
MANPREFIX
?=
${PREFIX}
/share/man
DESKTOPPREFIX
?=
${PREFIX}
/share/applications
#
list of : seperated values
#
plugin directory
PLUGINDIR
?=
${PREFIX}
/lib/zathura
# locale directory
LOCALEDIR
?=
${PREFIX}
/share/locale
# libs
# set this to 0 if you don't need to link against dl
GTK_INC
?=
$(
shell
pkg-config
--cflags
gtk+-
${ZATHURA_GTK_VERSION}
.0
)
GTK_LIB
?=
$(
shell
pkg-config
--libs
gtk+-
${ZATHURA_GTK_VERSION}
.0 gthread-2.0
)
...
...
@@ -37,7 +37,7 @@ LIBS = ${GIRARA_LIB} ${GTK_LIB} ${DL_LIB} -lpthread -lm
# flags
CFLAGS
+=
-std
=
c99
-pedantic
-Wall
-Wno-format-zero-length
-Wextra
$(INCS)
CPPFLAGS
+=
-DZATHURA_PLUGINDIR
=
\"
${PLUGINDIR}
\"
CPPFLAGS
+=
-DZATHURA_PLUGINDIR
=
\"
${PLUGINDIR}
\"
-DGETTEXT_PACKAGE
=
\"
${PROJECT}
\"
-DLOCALEDIR
=
\"
${LOCALEDIR}
\"
# debug
DFLAGS
?=
-g
...
...
main.c
View file @
9ac4bdf0
...
...
@@ -2,12 +2,18 @@
#include <stdio.h>
#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include "zathura.h"
/* main function */
int
main
(
int
argc
,
char
*
argv
[])
{
setlocale
(
LC_ALL
,
""
);
bindtextdomain
(
GETTEXT_PACKAGE
,
LOCALEDIR
);
bind_textdomain_codeset
(
GETTEXT_PACKAGE
,
"UTF-8"
);
textdomain
(
GETTEXT_PACKAGE
);
g_thread_init
(
NULL
);
gdk_threads_init
();
gtk_init
(
&
argc
,
&
argv
);
...
...
po/.gitignore
0 → 100644
View file @
9ac4bdf0
POTFILES.in*
*.mo
po/Makefile
0 → 100644
View file @
9ac4bdf0
# See LICENSE file for license and copyright information
PROJECT
=
zathura
CATALOGS
=
$(
wildcard
*
.po
)
MOS
=
$(
patsubst
%.po, %/LC_MESSAGES/
${PROJECT}
.mo,
$(CATALOGS)
)
include
../config.mk
include
../common.mk
all
:
${MOS}
clean
:
rm
-rf
POTFILES.in POTFILES.in.tmp
$(
patsubst
%.po, %,
$(CATALOGS)
)
POTFILES.in
:
$(wildcard ../*.c)
$(QUIET)
set
-e
&&
rm
-f
$@
.tmp
&&
touch
$@
.tmp
&&
\
for
f
in
$
(
^F
)
;
do
\
echo
$$
f
>>
$@
.tmp
;
\
done
&&
\
mv
$@
.tmp
$@
${PROJECT}.pot
:
POTFILES.in
$(ECHO)
regenerate
${PROJECT}
.pot
$(QUIET)
intltool-update
--pot
--gettext-package
=
${PROJECT}
%.po
:
${PROJECT}.pot
$(ECHO)
updating language
$(
shell
echo
$@
|
sed
's/\.po//'
)
$(QUIET)
intltool-update
--dist
--gettext-package
=
${PROJECT}
$(
shell
echo
$@
|
sed
's/\.po//'
)
%/LC_MESSAGES/${PROJECT}.mo
:
%.po
@
mkdir
-p
$
(
@D
)
$(ECHO)
msgfmt
$(
shell
echo
$<
|
sed
's/\.po//'
)
$(QUIET)
msgfmt
$<
-o
$@
-f
install
:
${MOS}
$(ECHO)
installing translations
$(QUIET)
set
-e
&&
for
f
in
$^
;
do
\
mkdir
-p
$(DESTDIR)$(LOCALEDIR)
/
`
dirname
$$
f
`
;
\
install
-m
644
$$
f
$(DESTDIR)$(LOCALEDIR)
/
`
dirname
$$
f
`
;
\
done
po/de_DE.po
0 → 100644
View file @
9ac4bdf0
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-04 18:29+0100\n"
"PO-Revision-Date: 2012-03-04 17:77+0100\n"
"Last-Translator: Sebastian Ramacher <s.ramacher@gmx.at>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../zathura.c:52
msgid "Reparents to window specified by xid"
msgstr ""
#: ../zathura.c:53
msgid "Path to the config directory"
msgstr "Pfad des Konfigurationsverzeichnisses"
#: ../zathura.c:54
msgid "Path to the data directory"
msgstr ""
#: ../zathura.c:55
msgid "Path to the directories containing plugins"
msgstr ""
#: ../zathura.c:56
msgid "Fork into the background"
msgstr ""
po/zathura.pot
0 → 100644
View file @
9ac4bdf0
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-04 18:29+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"
#: ../zathura.c:52
msgid "Reparents to window specified by xid"
msgstr ""
#: ../zathura.c:53
msgid "Path to the config directory"
msgstr ""
#: ../zathura.c:54
msgid "Path to the data directory"
msgstr ""
#: ../zathura.c:55
msgid "Path to the directories containing plugins"
msgstr ""
#: ../zathura.c:56
msgid "Fork into the background"
msgstr ""
zathura.c
View file @
9ac4bdf0
...
...
@@ -13,6 +13,7 @@
#include <girara/statusbar.h>
#include <girara/settings.h>
#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include "bookmarks.h"
#include "callbacks.h"
...
...
@@ -48,11 +49,11 @@ zathura_init(int argc, char* argv[])
bool
forkback
=
false
;
GOptionEntry
entries
[]
=
{
{
"reparent"
,
'e'
,
0
,
G_OPTION_ARG_INT
,
&
embed
,
"Reparents to window specified by xid"
,
"xid"
},
{
"config-dir"
,
'c'
,
0
,
G_OPTION_ARG_FILENAME
,
&
config_dir
,
"Path to the config directory"
,
"path"
},
{
"data-dir"
,
'd'
,
0
,
G_OPTION_ARG_FILENAME
,
&
data_dir
,
"Path to the data directory"
,
"path"
},
{
"plugins-dir"
,
'p'
,
0
,
G_OPTION_ARG_STRING
,
&
plugin_path
,
"Path to the directories containing plugins"
,
"path"
},
{
"fork"
,
'\0'
,
0
,
G_OPTION_ARG_NONE
,
&
forkback
,
"Fork into the background"
,
NULL
},
{
"reparent"
,
'e'
,
0
,
G_OPTION_ARG_INT
,
&
embed
,
_
(
"Reparents to window specified by xid"
)
,
"xid"
},
{
"config-dir"
,
'c'
,
0
,
G_OPTION_ARG_FILENAME
,
&
config_dir
,
_
(
"Path to the config directory"
)
,
"path"
},
{
"data-dir"
,
'd'
,
0
,
G_OPTION_ARG_FILENAME
,
&
data_dir
,
_
(
"Path to the data directory"
)
,
"path"
},
{
"plugins-dir"
,
'p'
,
0
,
G_OPTION_ARG_STRING
,
&
plugin_path
,
_
(
"Path to the directories containing plugins"
)
,
"path"
},
{
"fork"
,
'\0'
,
0
,
G_OPTION_ARG_NONE
,
&
forkback
,
_
(
"Fork into the background"
)
,
NULL
},
{
NULL
,
'\0'
,
0
,
0
,
NULL
,
NULL
,
NULL
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment