<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.rosa.ru/index.php?action=history&amp;feed=atom&amp;title=Localization_policy</id>
	<title>Localization policy - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.rosa.ru/index.php?action=history&amp;feed=atom&amp;title=Localization_policy"/>
	<link rel="alternate" type="text/html" href="http://wiki.rosa.ru/index.php?title=Localization_policy&amp;action=history"/>
	<updated>2026-05-08T05:23:46Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.rosa.ru/index.php?title=Localization_policy&amp;diff=93&amp;oldid=prev</id>
		<title>PastorDi: Новая страница: «==RPM Macros== ===%lang=== A file can be flagged %lang(LANG). This means it will only be installed if LANG is in %installlangs:   $ cat /etc/rpm/macros  %&#039;&#039;install&#039;&#039;langs en:fr:ja  Normally, you should not mark files by yourself. You should always use %find_lang which should do everything for you.  ===%find_lang=== Use macro %find_lang to collect and mark locale-dependent files.  Synopsis:   %find_lang name [filelist]  The macro %find_lang searches the direc...»</title>
		<link rel="alternate" type="text/html" href="http://wiki.rosa.ru/index.php?title=Localization_policy&amp;diff=93&amp;oldid=prev"/>
		<updated>2025-03-13T17:06:38Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «==RPM Macros== ===%lang=== A file can be flagged %lang(LANG). This means it will only be installed if LANG is in %installlangs:   $ cat /etc/rpm/macros  %&amp;#039;&amp;#039;install&amp;#039;&amp;#039;langs en:fr:ja  Normally, you should not mark files by yourself. You should always use %find_lang which should do everything for you.  ===%find_lang=== Use macro %find_lang to collect and mark locale-dependent files.  Synopsis:   %find_lang name [filelist]  The macro %find_lang searches the direc...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==RPM Macros==&lt;br /&gt;
===%lang===&lt;br /&gt;
A file can be flagged %lang(LANG). This means it will only be installed if LANG is in %installlangs:&lt;br /&gt;
&lt;br /&gt;
 $ cat /etc/rpm/macros&lt;br /&gt;
 %&amp;#039;&amp;#039;install&amp;#039;&amp;#039;langs en:fr:ja&lt;br /&gt;
&lt;br /&gt;
Normally, you should not mark files by yourself. You should always use %find_lang which should do everything for you.&lt;br /&gt;
&lt;br /&gt;
===%find_lang===&lt;br /&gt;
Use macro %find_lang to collect and mark locale-dependent files.&lt;br /&gt;
&lt;br /&gt;
Synopsis:&lt;br /&gt;
&lt;br /&gt;
 %find_lang name [filelist]&lt;br /&gt;
&lt;br /&gt;
The macro %find_lang searches the directories /usr/share/locale and /usr/share/locale/*/LC_MESSAGES for name.mo files. It also searches gnome/help/name and kde/share/doc/HTML/&amp;#039;/name directories for a localized documentation. Then it creates the file filelist where the files are marked by the respective %lang(locale) tag and also by the %doc tag. Such a file list can be then passed to the %files tag via -f option. See below for an example.&lt;br /&gt;
&lt;br /&gt;
The optional filelist defines the name of the file where the generated list of files is stored. name.lang is used if not defined.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%install&lt;br /&gt;
...&lt;br /&gt;
%find_lang %{name}              # generate a special file list&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
%files -f %{name}.lang          # use the special file list&lt;br /&gt;
%defattr(-,root,root)           # list the other files&lt;br /&gt;
%doc README&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Explicit %lang==&lt;br /&gt;
In some cases, you may need to add things not handled by %find_lang. Example from numlock.spec:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%files&lt;br /&gt;
%defattr(755,root,root)&lt;br /&gt;
...&lt;br /&gt;
%lang(cs) /usr/X11R6/man/cs/man1/*&lt;br /&gt;
%lang(et) /usr/X11R6/man/et/man1/*&lt;br /&gt;
%lang(eu) /usr/X11R6/man/eu/man1/*&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===%lang drawback===&lt;br /&gt;
When adding a language on a installed system, the %lang flagged files in already installed packages are not added. This is why localedrake only propose languages chosen during installation.&lt;br /&gt;
&lt;br /&gt;
==One package per language==&lt;br /&gt;
%lang is quite nice for &amp;quot;not too big&amp;quot; language dependent files. When the size is quite big, it&amp;#039;s interesting to create separate packages:&lt;br /&gt;
&lt;br /&gt;
* to reduce the size of the package when one install over network&lt;br /&gt;
* to allow users to choose which l10n packages to mirror&lt;br /&gt;
* to create distributions with only the wanted l10n packages&lt;br /&gt;
&lt;br /&gt;
The per language package should:&lt;br /&gt;
&lt;br /&gt;
* be named alike openoffice.org-l10n-LANG or man-pages-LANG, where LANG is the locale name (eg: fr, pt_BR...)&lt;br /&gt;
* provide a virtual package alike openoffice.org-l10n or man-pages-l10n or aspell-dictionary (this allow Suggest: aspell-dictionary, !! work in progress !!)&lt;br /&gt;
* require the corresponding locale, to allow a simple heuristic to choose the best package (eg: if locales-fr is installed, choose aspell-fr because aspell-fr requires locales-fr)&lt;br /&gt;
&lt;br /&gt;
[[Категория:Политики сборки пакетов]]&lt;/div&gt;</summary>
		<author><name>PastorDi</name></author>
	</entry>
</feed>