-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
111 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
i18n.gettext('liferea', preset: 'glib') | ||
i18n_result = i18n.gettext(gettext_package, preset: 'glib') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
/** | ||
* Localization stylesheet for Liferea | ||
* | ||
* Copyright (C) 2006 Aristotle Pagaltzis <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under 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. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
--> | ||
|
||
<xsl:stylesheet | ||
version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
|
||
<!-- the locale to use --> | ||
<xsl:param name="lang" /> <!-- e.g. "de_AT" --> | ||
<xsl:param name="shortlang" /> <!-- e.g. "de" --> | ||
|
||
<!-- identity copy --> | ||
<xsl:template match="node()|@*|comment()|processing-instruction()"> | ||
<xsl:copy> | ||
<xsl:apply-templates select="@*|node()"/> | ||
</xsl:copy> | ||
</xsl:template> | ||
|
||
<!-- drop elements that have an @xml:lang attribute but with | ||
the wrong value --> | ||
<xsl:template match="*[ @xml:lang ]"> | ||
<xsl:if test="@xml:lang = $lang or @xml:lang = $shortlang"> | ||
<xsl:copy> | ||
<xsl:apply-templates select="@*|node()"/> | ||
</xsl:copy> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
<xsl:key | ||
name="translations" | ||
match="*[ @xml:lang ]" | ||
use="preceding-sibling::*[ not( @xml:lang ) ][1]" | ||
/> | ||
|
||
<!-- handling for the untranslated nodes (can be dropped if there | ||
is a node with a translation) --> | ||
<xsl:template match="*[ not( @xml:lang ) ]"> | ||
<xsl:if test="not( key( 'translations', . )[ @xml:lang = $lang or @xml:lang = $shortlang ] )"> | ||
<xsl:copy> | ||
<xsl:apply-templates select="@*|node()"/> | ||
</xsl:copy> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
liferea_resources = gnome.compile_resources( | ||
'resources', 'gresource.xml', | ||
source_dir : '.', | ||
c_name : 'liferea_resources', | ||
dependencies : [ | ||
custom_target( | ||
input: 'item.xml.in', | ||
output: 'item.xml', | ||
command: [ | ||
find_program('intltool-merge'), | ||
'-x', | ||
'-u', | ||
'-c', | ||
join_paths(meson.project_source_root(), 'po/.intltool-merge-cache'), | ||
join_paths(meson.project_source_root(), 'po'), | ||
'@INPUT@', | ||
'@OUTPUT@', | ||
] | ||
), | ||
custom_target( | ||
input: 'node.xml.in', | ||
output: 'node.xml', | ||
command: [ | ||
find_program('intltool-merge'), | ||
'-x', | ||
'-u', | ||
'-c', | ||
join_paths(meson.project_source_root(), 'po/.intltool-merge-cache'), | ||
join_paths(meson.project_source_root(), 'po'), | ||
'@INPUT@', | ||
'@OUTPUT@', | ||
] | ||
) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters