ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] menu DURING_INSTALL
Date: Tue, 25 Nov 2008 14:32:26 +0300
Message-ID: <20081125113226.GH8869@altlinux.org> (raw)
In-Reply-To: <20081125110514.GA25399@dad.imath.kiev.ua>

[-- Attachment #1: Type: text/plain, Size: 2562 bytes --]

On Tue, Nov 25, 2008 at 01:05:15PM +0200, Igor Vlasenko wrote:
> On Tue, Nov 25, 2008 at 01:37:34PM +0300, Alexey Tourbin wrote:
> > По-моему, в списке languages() кодировки указывать не надо.
> 
> Но кодировки нужно указывать в langs(), 
> чтобы не сломать рабочие системы :(

lang() будет работать как и раньше.

> Например, в
> /etc/menu-methods/icewm:
> [...]
>   x11=  "  prog \"" translate(lang(), title()) "\" \"" findicon($icon, "-") "\" 
> " $command"\n"
> [...]
> 
> $ cat /etc/menu-methods/lang.h
> function lang()="ru_RU.CP1251"
> function languages()="ru_RU"
> 
> (У меня локаль пользователей - ru_RU.CP1251).
> 
> Проблема в том, что, например, icewm не поддерживает кодировок,
> что видит, то и поет (хоть бНОПНЯ, хоть РєРСРs).

Вот как это будет работать.

$ hsh --init && hsh-install menu
...
<13>Nov 25 11:26:26 rpmi: sox-14.0.1-alt3 installed
<13>Nov 25 11:26:26 rpmi: sound_handler-0.3.1-alt1 installed
<13>Nov 25 11:26:26 rpmi: libao-alsa-0.8.8-alt1.13239 installed
<13>Nov 25 11:26:26 rpmi: menu-2.1.41-alt3 installed
$ echo LC_MESSAGES=ru_RU.CP1251 |hsh-run --rooter -- sort -o /etc/sysconfig/i18n
$ hsh-run --rooter /usr/sbin/update-menus
$ hsh-run cat /etc/menu-methods/lang.h   
# Generated by /usr/sbin/update-menus.
function lang()="ru_RU.CP1251"
function languages()="af:am:ar:az:be:bg:br:bs:ca:cs:cy:da:de:el:eo:es:et:eu:fa:fi:fr:ga:gl:he:hi:hr:hu:id:is:it:ja:ka:ko:lt:lv:mi:mk:mn:ms:mt:nb:nl:nn:oc:pl:pt:pt_BR:ro:ru:sk:sl:sq:sr:sr@Latn:sv:ta:tg:th:tr:uk:uz:uz@Cyrl:vi:wa:xh:zh_CN:zh_TW"
$ 

(Далее.)

$ hsh-install icewm
...
<13>Nov 25 11:28:41 rpmi: xinitrc-2.4.31-alt1 installed
<13>Nov 25 11:28:41 rpmi: icewm-light-1:1.2.36-alt1 installed
WARNING: icewm-light uses obsolete alternatives interface
<13>Nov 25 11:28:41 rpmi: design-icewm-1.0-alt5 installed
<13>Nov 25 11:28:41 rpmi: icewm-1:1.2.36-alt1 installed
$ hsh-run cat /etc/X11/icewm/menu |iconv -f cp1251
prog "Terminal" xterm xvt
menu "Сессия" "windowmanager_section" {
menu "Оконные менеджеры" "windowmanager_section" {
  restart "IceWM" "icewm" icewm
}
}
menu "Терминалы" "terminals_section" {
  prog "UXTerm" "xterm-color_48x48" uxterm
  prog "XTerm" "xterm-color_48x48" xterm -name XTerm
}
$

> На примере 
> /etc/menu-methods/xdg-desktop-entry-spec-apps
> эта проблема не видна, так как для .desktop файлов 
> конечная кодировка (utf-8) задана заранее
> и не зависит от системной локали.

lang() всегда соответсвует LC_MESSAGES (или LC_ALL), и поэтому,
как правило, там всегда есть кодировка.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-11-25 11:32 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22  7:19 Alexey Tourbin
2008-09-22  8:21 ` Anton Farygin
2008-09-22  8:25 ` Stanislav Ievlev
2008-09-22  8:37   ` Anton Farygin
2008-09-22 11:22     ` Sergey V Turchin
2008-11-11 12:04 ` Alexey Tourbin
2008-11-11 12:35   ` Sergey V Turchin
2008-11-11 12:39   ` Alexey I. Froloff
2008-11-11 12:56     ` Alexey Tourbin
2008-11-11 13:00       ` Sergey V Turchin
2008-11-11 13:03         ` Alexey Tourbin
2008-11-11 13:14           ` Sergey V Turchin
2008-11-11 13:28             ` Alexey Tourbin
2008-11-11 13:54               ` Sergey V Turchin
2008-11-11 14:07                 ` Alexey Tourbin
2008-11-11 14:35                   ` Sergey V Turchin
2008-11-11 14:57                   ` Alexey Tourbin
2008-11-11 15:05                     ` Sergey V Turchin
2008-11-11 14:34                 ` Alexey Tourbin
2008-11-11 14:59                   ` Sergey V Turchin
2008-11-12 12:51           ` Stanislav Ievlev
2008-11-11 13:25       ` Alexey I. Froloff
2008-11-11 14:01         ` Led
2008-11-11 14:11           ` Alexey Gladkov
2008-11-11 14:17             ` Led
2008-11-11 14:18               ` Mikhail Gusarov
2008-11-11 14:23               ` Alexey Gladkov
2008-11-11 14:35                 ` Led
2008-11-11 14:48                   ` Alexey Gladkov
2008-11-12 12:51   ` Stanislav Ievlev
2008-11-12 13:00     ` Alexey Tourbin
2008-11-12 13:02       ` Stanislav Ievlev
2008-11-25 10:37     ` Alexey Tourbin
2008-11-25 11:05       ` Igor Vlasenko
2008-11-25 11:32         ` Alexey Tourbin [this message]
2008-11-25 11:32       ` Sergey V Turchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081125113226.GH8869@altlinux.org \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git