Skip to content

Commit

Permalink
merge mvo's langpag sync; tweak messages and test a little
Browse files Browse the repository at this point in the history
  • Loading branch information
chipaca committed Oct 18, 2017
1 parent 863c607 commit 36bfa6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/snap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ func lintDesc(cmdName, optName, desc, origDesc string) {
// want to change it to check for urlish things instead of just
// login.u.c.
if unicode.IsLower(r) && !strings.HasPrefix(desc, "login.ubuntu.com") {
tidyNoticef("description of %s's %q not uppercase: %q", cmdName, optName, desc)
tidyNoticef("description of %s's %q is lowercase: %q", cmdName, optName, desc)
}
}
}

func lintArg(cmdName, optName, desc, origDesc string) {
lintDesc(cmdName, optName, desc, origDesc)
if optName[0] != '<' || optName[len(optName)-1] != '>' {
tidyNoticef("argument %q's %q should have <>s", cmdName, optName)
tidyNoticef("argument %q's %q should be wrapped in <>s", cmdName, optName)
}
}

Expand Down
11 changes: 7 additions & 4 deletions tests/main/i18n/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ execute: |
echo "Ensure that i18n works"
LANG=de snap changes everything | MATCH "Ja, ja, allerdings."
echo "Basic smoke test to ensure no locale causes crashes"
echo "Basic smoke test to ensure no locale causes crashes nor warnings"
for p in /usr/share/locale/*; do
export LANG=$(basename $p)
snap >/dev/null
unset LANG
out=$( LANG=$(basename $p) snap 2>&1 >/dev/null )
if [ -n "$out" ]; then
echo "$p"
echo "$out"
exit 1
fi
done

0 comments on commit 36bfa6b

Please sign in to comment.