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
=== modified file 'debian/changelog'
--- debian/changelog 2010-11-09 23:45:59 +0000
+++ debian/changelog 2010-11-18 21:49:46 +0000
@@ -1,8 +1,9 @@
1bikeshed (1.6) unreleased; urgency=low1bikeshed (1.6) unreleased; urgency=low
22
3 * UNRELEASED3 [ Nobuto MURATA ]
4 * dman: set users' locale when gettting manpages, LP: #677200
45
5 -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 09 Nov 2010 17:45:59 -06006 -- Nobuto MURATA <nobuto@nobuto-murata.org> Fri, 19 Nov 2010 06:27:17 +0900
67
7bikeshed (1.5-0ubuntu1) natty; urgency=low8bikeshed (1.5-0ubuntu1) natty; urgency=low
89
910
=== modified file 'dman'
--- dman 2010-09-27 08:26:55 +0000
+++ dman 2010-11-18 21:49:46 +0000
@@ -41,8 +41,10 @@
41if [ ! -z "$LC_MESSAGES" ]; then41if [ ! -z "$LC_MESSAGES" ]; then
42 LOCALE="$LC_MESSAGES"42 LOCALE="$LC_MESSAGES"
43fi43fi
44if echo $LOCALE | grep -q "^en"; then44if [ "$LOCALE" = C ]; then
45 LOCALE=""45 LOCALE=""
46elif [ ! -z "$LOCALE" ]; then
47 LOCALE="${LOCALE%%_*}"
46fi48fi
4749
48URL="http://manpages.ubuntu.com/manpages.gz/"50URL="http://manpages.ubuntu.com/manpages.gz/"
@@ -53,6 +55,10 @@
53 man="$mandir/$i"55 man="$mandir/$i"
54 if wget -O "$man" "$URL/$DISTRIB_CODENAME/$LOCALE/man$i/$PAGE.$i.gz" 2>/dev/null; then56 if wget -O "$man" "$URL/$DISTRIB_CODENAME/$LOCALE/man$i/$PAGE.$i.gz" 2>/dev/null; then
55 man $MAN_ARGS -l "$man" || true57 man $MAN_ARGS -l "$man" || true
58 elif [ ! -z "$LOCALE" -a "$LOCALE" != en ]; then
59 if wget -O "$man" "$URL/$DISTRIB_CODENAME//man$i/$PAGE.$i.gz" 2>/dev/null; then
60 man $MAN_ARGS -l "$man" || true
61 fi
56 fi62 fi
57 rm -f "$man"63 rm -f "$man"
58done64done

Subscribers

People subscribed via source and target branches