Ubuntu

Merge lp:~mitya57/ubuntu/saucy/memtest86+/lp537998 into lp:ubuntu/saucy/memtest86+

Proposed by Dmitry Shachnev on 2013-05-13
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~mitya57/ubuntu/saucy/memtest86+/lp537998
Merge into: lp:ubuntu/saucy/memtest86+
Diff against target: 121 lines (+34/-6) 4 files modified
To merge this branch: bzr merge lp:~mitya57/ubuntu/saucy/memtest86+/lp537998
Reviewer Review Type Date Requested Status
Ubuntu branches 2013-05-13 Pending
Review via email: mp+163521@code.launchpad.net

Description of the Change

This enables translation of 4 strings visible in the boot menu (see bug 537998):

- "Memory test (memtest86+)"
- "Memory test (memtest86+, serial console 115200)"
- "Memory test (memtest86+, experimental multiboot)"
- "Memory test (memtest86+, serial console 115200, experimental multiboot)"

Unfortunately intltool-extract doesn't support shell files, so the .pot template has to be generated manually (or using xgettext). I've modified debian/rules to make sure that the clean target won't touch the .pot template.

Someone will also need to enable automatic import of templates in Rosetta to get this actually working: https://translations.launchpad.net/ubuntu/saucy/+source/memtest86+.

I will submit this to Debian when/if this lands in saucy and is working there.

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

Thank you for your work

Preview Diff

1=== modified file 'debian/changelog'
2--- debian/changelog 2012-12-04 16:23:35 +0000
3+++ debian/changelog 2013-05-13 12:46:31 +0000
4@@ -1,3 +1,9 @@
5+memtest86+ (4.20-1.1ubuntu4) UNRELEASED; urgency=low
6+
7+ * Support localization of GRUB menu entries (LP: #537998).
8+
9+ -- Dmitry Shachnev <mitya57@ubuntu.com> Mon, 13 May 2013 15:06:15 +0400
10+
11 memtest86+ (4.20-1.1ubuntu3) raring; urgency=low
12
13 * Fix test#7 false positives due to compiler issues. (LP: #1071209)
14
15=== modified file 'debian/grub'
16--- debian/grub 2012-10-11 13:14:32 +0000
17+++ debian/grub 2013-05-13 12:46:31 +0000
18@@ -23,19 +23,21 @@
19 /dev/loop/*|/dev/loop[0-9]) exit 0 ;;
20 esac
21
22+export TEXTDOMAIN=memtest86+
23+
24 prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
25
26 if test -e /boot/memtest86+.bin ; then
27 MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+.bin" )
28 echo "Found memtest86+ image: $MEMTESTPATH" >&2
29 cat << EOF
30-menuentry "Memory test (memtest86+)" {
31+menuentry '$(gettext_printf "Memory test (memtest86+)")' {
32 EOF
33 printf '%s\n' "${prepare_boot_cache}"
34 cat << EOF
35 $LX $MEMTESTPATH
36 }
37-menuentry "Memory test (memtest86+, serial console 115200)" {
38+menuentry '$(gettext_printf "Memory test (memtest86+, serial console 115200)")' {
39 EOF
40 printf '%s\n' "${prepare_boot_cache}"
41 cat << EOF
42@@ -48,13 +50,13 @@
43 # MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+_multiboot.bin" )
44 # echo "Found memtest86+ multiboot image: $MEMTESTPATH" >&2
45 # cat << EOF
46-#menuentry "Memory test (memtest86+, experimental multiboot)" {
47+#menuentry '$(gettext_printf "Memory test (memtest86+, experimental multiboot)")' {
48 #EOF
49 # printf '%s\n' "${prepare_boot_cache}"
50 # cat << EOF
51 # multiboot $MEMTESTPATH
52 #}
53-#menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
54+#menuentry '$(gettext_printf "Memory test (memtest86+, serial console 115200, experimental multiboot)")' {
55 #EOF
56 # printf '%s\n' "${prepare_boot_cache}"
57 # cat << EOF
58
59=== modified file 'debian/po/templates.pot'
60--- debian/po/templates.pot 2011-06-28 07:15:27 +0000
61+++ debian/po/templates.pot 2013-05-13 12:46:31 +0000
62@@ -16,7 +16,7 @@
63 msgstr ""
64 "Project-Id-Version: PACKAGE VERSION\n"
65 "Report-Msgid-Bugs-To: memtest86+@packages.debian.org\n"
66-"POT-Creation-Date: 2009-12-02 22:23+0100\n"
67+"POT-Creation-Date: 2013-05-13 16:14+0400\n"
68 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
69 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
70 "Language-Team: LANGUAGE <LL@li.org>\n"
71@@ -38,3 +38,19 @@
72 "memtest86+ image, then it should be re-run in order to allow booting the new "
73 "image."
74 msgstr ""
75+
76+#: ../grub:34
77+msgid "Memory test (memtest86+)"
78+msgstr ""
79+
80+#: ../grub:40
81+msgid "Memory test (memtest86+, serial console 115200)"
82+msgstr ""
83+
84+#: ../grub:53
85+msgid "Memory test (memtest86+, experimental multiboot)"
86+msgstr ""
87+
88+#: ../grub:59
89+msgid "Memory test (memtest86+, serial console 115200, experimental multiboot)"
90+msgstr ""
91
92=== modified file 'debian/rules'
93--- debian/rules 2011-11-27 09:51:14 +0000
94+++ debian/rules 2013-05-13 12:46:31 +0000
95@@ -15,6 +15,9 @@
96
97 $(MAKE) # CC=gcc-2.95
98 ./makeiso.sh
99+ ls debian/po --hide *.pot --hide *.in | sed 's/\.po//g' | xargs -I {} -t sh -c \
100+ "mkdir -p debian/locale/{}/LC_MESSAGES/ && \
101+ msgfmt debian/po/{}.po -o debian/locale/{}/LC_MESSAGES/memtest86+.mo"
102 touch build-stamp
103
104 clean:
105@@ -25,7 +28,7 @@
106 [ ! -f Makefile ] || $(MAKE) clean
107
108 # make sure PO files are always up-to-date
109- debconf-updatepo
110+ debconf-updatepo --skip-pot
111
112 dh_clean
113
114@@ -45,6 +48,7 @@
115 install -d debian/$(PACKAGE)/usr/share/lintian/overrides
116 install -m644 debian/lintian-overrides \
117 debian/$(PACKAGE)/usr/share/lintian/overrides/$(PACKAGE)
118+ mv debian/locale debian/$(PACKAGE)/usr/share
119
120 # Build architecture-independent files here.
121 binary-indep: build install

Subscribers

People subscribed via source and target branches