intltool r756 - in trunk: . tests tests/cases tests/results
- From: dobey svn gnome org
- To: svn-commits-list gnome org
- Subject: intltool r756 - in trunk: . tests tests/cases tests/results
- Date: Mon, 25 Aug 2008 03:06:46 +0000 (UTC)
Author: dobey
Date: Mon Aug 25 03:06:45 2008
New Revision: 756
URL: http://svn.gnome.org/viewvc/intltool?rev=756&view=rev
Log:
2008-08-24 Rodney Dawes <dobey pwns gmail com>
* intltool-merge.in (desktop_merge_translations):
Fix the regex here to adhere to the Desktop File Spec's allowed chars
* tests/cases/Makefile.am:
* tests/cases/extract13.desktop.in:
* tests/results/extract13.desktop:
* tests/results/extract13.desktop.in.h:
* tests/selftest.pl.in:
Add a test case for merging translations back into the desktop file
Fixes #549243
Added:
trunk/tests/results/extract13.desktop
Modified:
trunk/ChangeLog
trunk/intltool-merge.in
trunk/tests/cases/ (props changed)
trunk/tests/cases/Makefile.am
trunk/tests/cases/extract13.desktop.in
trunk/tests/results/extract13.desktop.in.h
trunk/tests/selftest.pl.in
Modified: trunk/intltool-merge.in
==============================================================================
--- trunk/intltool-merge.in (original)
+++ trunk/intltool-merge.in Mon Aug 25 03:06:45 2008
@@ -1224,7 +1224,7 @@
while (<INPUT>)
{
- if (s/^(\s*)_(\w+=(.*))/$1$2/)
+ if (s/^(\s*)_([A-Za-z0-9\-]+=(.*))/$1$2/)
{
my $string = $3;
Modified: trunk/tests/cases/Makefile.am
==============================================================================
--- trunk/tests/cases/Makefile.am (original)
+++ trunk/tests/cases/Makefile.am Mon Aug 25 03:06:45 2008
@@ -48,8 +48,10 @@
context.xml \
context.xml.in.h \
extract-comments.xml.h \
+ extract1.desktop.h \
extract10.templates_.h \
extract12.xml.in.h \
+ extract13.desktop \
extract13.desktop.in.h \
extract14.xml.in.h \
extract9.xml \
Modified: trunk/tests/cases/extract13.desktop.in
==============================================================================
--- trunk/tests/cases/extract13.desktop.in (original)
+++ trunk/tests/cases/extract13.desktop.in Mon Aug 25 03:06:45 2008
@@ -23,3 +23,4 @@
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-utils
X-GNOME-Bugzilla-Component=gsearchtool
+_X-Color=Blue
Added: trunk/tests/results/extract13.desktop
==============================================================================
--- (empty file)
+++ trunk/tests/results/extract13.desktop Mon Aug 25 03:06:45 2008
@@ -0,0 +1,26 @@
+[Desktop Entry]
+Encoding=UTF-8
+# 1. This comment should NOT be extracted.
+# 2. This comment should be extracted.
+Name=Find Files...
+# 3. This comment should NOT be extracted.
+# 4. This comment also should be extracted.
+Comment=Locate documents and folders on this computer by name or content
+# 5. This comment should NOT be extracted.
+Exec=gnome-search-tool
+# 6. This comment should NOT be extracted.
+Icon=gnome-searchtool
+# 7. This comment should NOT be extracted.
+Terminal=false
+# 8. This comment should NOT be extracted.
+Type=Application
+# 9. This comment should NOT be extracted.
+StartupNotify=true
+# 10. This comment should NOT be extracted.
+Categories=GNOME;GTK;Core;
+# 11. This comment should NOT be extracted.
+X-GNOME-DocPath=gnome-search-tool/gnome-search-tool.xml
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=gnome-utils
+X-GNOME-Bugzilla-Component=gsearchtool
+X-Color=Blue
Modified: trunk/tests/results/extract13.desktop.in.h
==============================================================================
--- trunk/tests/results/extract13.desktop.in.h (original)
+++ trunk/tests/results/extract13.desktop.in.h Mon Aug 25 03:06:45 2008
@@ -1,3 +1,4 @@
+char *s = N_("Blue");
/* 2. This comment should be extracted. */
char *s = N_("Find Files...");
/* 4. This comment also should be extracted. */
Modified: trunk/tests/selftest.pl.in
==============================================================================
--- trunk/tests/selftest.pl.in (original)
+++ trunk/tests/selftest.pl.in Mon Aug 25 03:06:45 2008
@@ -257,22 +257,29 @@
system("$INTLTOOL_EXTRACT --type=gettext/ini --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "33. Decode XML entities in the right order when extracting: ";
+print "33. Merge translations from a .desktop.in file: ";
+$case = "extract13.desktop.in";
+$result = $case;
+($result = $case) =~ s/\.in//;
+system("$INTLTOOL_MERGE -d --quiet cases cases/$case cases/$result") == 0 or $failed = 1;
+check_merge_result($case);
+
+print "34. Decode XML entities in the right order when extracting: ";
$case = "extract14.xml.in";
system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "34. Merge XML translations, decoding entities in the right order: ";
+print "35. Merge XML translations, decoding entities in the right order: ";
$case = "merge12.xml";
system("$INTLTOOL_MERGE -x --quiet cases cases/$case.in cases/$case") == 0 or $failed = 1;
check_merge_result($case);
-print "35. Extract messages from an XML file with msgctxts: ";
+print "36. Extract messages from an XML file with msgctxts: ";
$case = "context.xml.in";
system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "36. Merge translations into an XML file with msgctxts: ";
+print "37. Merge translations into an XML file with msgctxts: ";
$case = "context.xml";
system("$INTLTOOL_MERGE -x --quiet cases cases/$case.in cases/$case") == 0 or $failed = 1;
check_merge_result($case);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]