Merge lp:~nobuto/bikeshed/lp677200 into lp:bikeshed

Proposed by Nobuto Murata
Status: Merged
Merged at revision: 57
Proposed branch: lp:~nobuto/bikeshed/lp677200
Merge into: lp:bikeshed
Diff against target: 42 lines (+10/-3)
2 files modified
debian/changelog (+3/-2)
dman (+7/-1)
To merge this branch: bzr merge lp:~nobuto/bikeshed/lp677200
Reviewer Review Type Date Requested Status
bikeshed Pending
Review via email: mp+41239@code.launchpad.net

Description of the change

This branch fixes hard coding against en_* locales.
  - add cases LANG="C" or LC_MESSAGES="C" to use generic locale
  - strip out "_COUNTRYCODE.ENCODING" string to generate correct URLs
  - add fall-back to generic locale if there is no localised manpage

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-11-09 23:45:59 +0000
3+++ debian/changelog 2010-11-18 21:49:46 +0000
4@@ -1,8 +1,9 @@
5 bikeshed (1.6) unreleased; urgency=low
6
7- * UNRELEASED
8+ [ Nobuto MURATA ]
9+ * dman: set users' locale when gettting manpages, LP: #677200
10
11- -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 09 Nov 2010 17:45:59 -0600
12+ -- Nobuto MURATA <nobuto@nobuto-murata.org> Fri, 19 Nov 2010 06:27:17 +0900
13
14 bikeshed (1.5-0ubuntu1) natty; urgency=low
15
16
17=== modified file 'dman'
18--- dman 2010-09-27 08:26:55 +0000
19+++ dman 2010-11-18 21:49:46 +0000
20@@ -41,8 +41,10 @@
21 if [ ! -z "$LC_MESSAGES" ]; then
22 LOCALE="$LC_MESSAGES"
23 fi
24-if echo $LOCALE | grep -q "^en"; then
25+if [ "$LOCALE" = C ]; then
26 LOCALE=""
27+elif [ ! -z "$LOCALE" ]; then
28+ LOCALE="${LOCALE%%_*}"
29 fi
30
31 URL="http://manpages.ubuntu.com/manpages.gz/"
32@@ -53,6 +55,10 @@
33 man="$mandir/$i"
34 if wget -O "$man" "$URL/$DISTRIB_CODENAME/$LOCALE/man$i/$PAGE.$i.gz" 2>/dev/null; then
35 man $MAN_ARGS -l "$man" || true
36+ elif [ ! -z "$LOCALE" -a "$LOCALE" != en ]; then
37+ if wget -O "$man" "$URL/$DISTRIB_CODENAME//man$i/$PAGE.$i.gz" 2>/dev/null; then
38+ man $MAN_ARGS -l "$man" || true
39+ fi
40 fi
41 rm -f "$man"
42 done

Subscribers

People subscribed via source and target branches