From 914c6a20736901a6d7283740058c28f9868a385d Mon Sep 17 00:00:00 2001 From: Weblate Date: May 13 2022 15:24:39 +0000 Subject: Added translation using Weblate (Chinese (Simplified)) Co-authored-by: Weblate --- diff --git a/po/zh_Hans/master/pages/Alternatives.po b/po/zh_Hans/master/pages/Alternatives.po new file mode 100644 index 0000000..b15f46c --- /dev/null +++ b/po/zh_Hans/master/pages/Alternatives.po @@ -0,0 +1,353 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2021-10-20 22:03+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: zh_Hans\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. type: Title = +#: ./pages/Alternatives.adoc:1 +#, no-wrap +msgid "Alternatives" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:11 +msgid "" +"Alternatives provide means for parallel installation of packages which " +"provide the same functionality by maintaining sets of symlinks (one per " +"package) pointing to alternativized files like this: `+/path/original-file " +"-> /etc/alternatives/packagename-original-file -> " +"/path/original-file.suffix+` For more information, see " +"`+update-alternatives(8)+` manpage." +msgstr "" + +#. type: Title == +#: ./pages/Alternatives.adoc:12 +#, no-wrap +msgid "Usage within Fedora" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:15 +msgid "Alternatives *MAY* be used to allow parallel installation of software when:" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:20 +msgid "" +"the software can be used as a drop-in replacement and functions with " +"sufficient similarity that users and other programs would, within reason, " +"not need to know which variant is currently installed" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:22 +#, no-wrap +msgid "*AND*\n" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:26 +msgid "" +"the selection of the software is only performed system-wide by the system " +"administrator and end users do not have a need to switch between the " +"variants." +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:28 +msgid "Inversely, alternatives *MUST NOT* be used when:" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:33 +msgid "" +"The software is not a drop-in replacement. For instance, if common command " +"line arguments are different between the two variants, alternatives *MUST " +"NOT* be used." +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:35 +#, no-wrap +msgid "*OR*\n" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:39 +msgid "" +"End users will care which variant they are using. If a non-root user would " +"gain value by switching between the variants then alternatives *MUST NOT* be " +"used." +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:42 +msgid "" +"A good example of using alternatives are the various MTAs which all provide " +"`+/usr/sbin/sendmail+` with similar command line arguments." +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:44 +msgid "Bad examples of using alternatives include:" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:48 +msgid "" +"the various MPI environments where users care both about which MPI " +"environment they compile against and which one they run against" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:52 +msgid "" +"choice of editor when the user invokes \"vi\" where the user will care about " +"feature availability, compatibility with plugins, etc" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:59 +msgid "" +"Cases where parallel installation is desirable but alternatives is " +"unsuitable may be scenarios where link:../EnvironmentModules/[Environment " +"Modules] are appropriate. MPI and python-sphinx (until Fedora 31) are " +"example packages using environment-modules for this purpose." +msgstr "" + +#. type: Title == +#: ./pages/Alternatives.adoc:60 +#, no-wrap +msgid "How to use alternatives" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:71 +msgid "" +"If a package is using alternatives, the files which would otherwise conflict " +"MUST be installed with an appropriate suffix (for example: " +"`+%{_sbindir}/sendmail.postfix+` instead of `+%{_sbindir}/sendmail+`), the " +"original locations MUST be touched (for example: `+touch " +"%{_sbindir}/sendmail+`), the links set up by alternatives MUST be listed as " +"%ghost in the file list and proper Requires: MUST be added, like in the " +"examples below." +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:75 +msgid "" +"Putting the alternativized files in the file list ensures that they are " +"owned by respective packages, which means that commands like:" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:77 +msgid "rpm -qf /usr/bin/foo" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:78 +msgid "dnf install /usr/bin/foo" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:79 +msgid "repoquery --whatprovides /usr/bin/foo" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:82 +msgid "" +"all work properly. Using %ghost for this purpose allows using globs and " +"generated file lists." +msgstr "" + +#. type: Title == +#: ./pages/Alternatives.adoc:83 +#, no-wrap +msgid "Examples" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:86 +msgid "Example from antlr.spec:" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:94 +#, no-wrap +msgid "" +"Requires(post): %{_sbindir}/update-alternatives\n" +"Requires(postun): %{_sbindir}/update-alternatives\n" +"...\n" +"%install\n" +"...\n" +"touch %{buildroot}%{_bindir}/antlr\n" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:98 +#, no-wrap +msgid "" +"%post\n" +"%{_sbindir}/update-alternatives --install %{_bindir}/antlr \\\n" +" %{name} %{_bindir}/antlr-java 10\n" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:108 +#, no-wrap +msgid "" +"%postun\n" +"if [ $1 -eq 0 ] ; then\n" +" %{_sbindir}/update-alternatives --remove %{name} %{_bindir}/antlr-java\n" +"fi\n" +"...\n" +"%files\n" +"...\n" +"%ghost %{_bindir}/antlr\n" +"%{_bindir}/antlr-java\n" +msgstr "" + +#. type: Plain text +#: ./pages/Alternatives.adoc:112 +msgid "" +"And a more complex example of alternatives invocation from sendmail.spec, " +"slightly edited:" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:135 +#, no-wrap +msgid "" +"Requires(post): %{_sbindir}/update-alternatives\n" +"Requires(postun): %{_sbindir}/update-alternatives\n" +"Requires(preun): %{_sbindir}/update-alternatives\n" +"...\n" +"%install\n" +"...\n" +"# rename files for alternative usage\n" +"mv %{buildroot}%{_sbindir}/sendmail " +"%{buildroot}%{_sbindir}/sendmail.sendmail\n" +"touch %{buildroot}%{_sbindir}/sendmail\n" +"for i in mailq newaliases rmail; do\n" +" mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i.sendmail\n" +" touch %{buildroot}%{_bindir}/$i\n" +"done\n" +"mv %{buildroot}%{_mandir}/man1/mailq.1 " +"%{buildroot}%{_mandir}/man1/mailq.sendmail.1\n" +"touch %{buildroot}%{_mandir}/man1/mailq.1\n" +"mv %{buildroot}%{_mandir}/man1/newaliases.1 " +"%{buildroot}%{_mandir}/man1/newaliases.sendmail.1\n" +"touch %{buildroot}%{_mandir}/man1/newaliases.1\n" +"mv %{buildroot}%{_mandir}/man5/aliases.5 " +"%{buildroot}%{_mandir}/man5/aliases.sendmail.5\n" +"touch %{buildroot}%{_mandir}/man5/aliases.5\n" +"mv %{buildroot}%{_mandir}/man8/sendmail.8 " +"%{buildroot}%{_mandir}/man8/sendmail.sendmail.8\n" +"touch %{buildroot}%{_mandir}/man8/sendmail.8\n" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:142 +#, no-wrap +msgid "" +"%postun\n" +"if [ \"$1\" -ge \"1\" ]; then\n" +" if [ \"`+readlink %{_sysconfdir}/alternatives/mta+`\" == " +"\"%{_sbindir}/sendmail.sendmail\" ]; then\n" +" %{_sbindir}/alternatives --set mta %{_sbindir}/sendmail.sendmail\n" +" fi\n" +"fi\n" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:157 +#, no-wrap +msgid "" +"%post\n" +"# Set up the alternatives files for MTAs.\n" +"%{_sbindir}/update-alternatives --install %{_sbindir}/sendmail mta " +"%{_sbindir}/sendmail.sendmail 90 \\\n" +" --slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.sendmail \\\n" +" --slave %{_bindir}/newaliases mta-newaliases " +"%{_bindir}/newaliases.sendmail \\\n" +" --slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.sendmail \\\n" +" --slave /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.sendmail \\\n" +" --slave %{_sysconfdir}/pam.d/smtp mta-pam " +"%{_sysconfdir}/pam.d/smtp.sendmail \\\n" +" --slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman " +"%{_mandir}/man8/sendmail.sendmail.8.gz \\\n" +" --slave %{_mandir}/man1/mailq.1.gz mta-mailqman " +"%{_mandir}/man1/mailq.sendmail.1.gz \\\n" +" --slave %{_mandir}/man1/newaliases.1.gz mta-newaliasesman " +"%{_mandir}/man1/newaliases.sendmail.1.gz \\\n" +" --slave %{_mandir}/man5/aliases.5.gz mta-aliasesman " +"%{_mandir}/man5/aliases.sendmail.5.gz \\\n" +" --initscript sendmail\n" +"...\n" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:163 +#, no-wrap +msgid "" +"%preun\n" +"if [ $1 = 0 ]; then\n" +" %{_sbindir}/update-alternatives --remove mta " +"%{_sbindir}/sendmail.sendmail\n" +"fi\n" +"...\n" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:176 +#, no-wrap +msgid "" +"%files\n" +"...\n" +"%ghost %{_sbindir}/sendmail\n" +"%ghost %{_bindir}/mailq\n" +"%ghost %{_bindir}/newaliases\n" +"%ghost %{_bindir}/rmail\n" +"%ghost /usr/lib/sendmail\n" +"%ghost %{_sysconfdir}/pam.d/smtp\n" +"%ghost %{_mandir}/man8/sendmail.8.gz\n" +"%ghost %{_mandir}/man1/mailq.1.gz\n" +"%ghost %{_mandir}/man1/newaliases.1.gz\n" +"%ghost %{_mandir}/man5/aliases.5.gz\n" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:187 +#, no-wrap +msgid "" +"%{_sbindir}/sendmail.sendmail\n" +"%{_bindir}/mailq.sendmail\n" +"%{_bindir}/newaliases.sendmail\n" +"%{_bindir}/rmail.sendmail\n" +"/usr/lib/sendmail.sendmail\n" +"%config(noreplace) %{_sysconfdir}/pam.d/smtp.sendmail\n" +"%{_mandir}/man8/sendmail.sendmail.8.gz\n" +"%{_mandir}/man1/mailq.sendmail.1.gz\n" +"%{_mandir}/man1/newaliases.sendmail.1.gz\n" +"%{_mandir}/man5/aliases.sendmail.5.gz\n" +msgstr "" + +#. type: delimited block . +#: ./pages/Alternatives.adoc:189 +#, no-wrap +msgid "%attr(0755,root,root) %{_initrddir}/sendmail\n" +msgstr ""