From 41bf42110d1713a21f18786ace933844ae9f1f5e Mon Sep 17 00:00:00 2001 From: wangqing Date: Mon, 20 Dec 2021 14:08:57 +0800 Subject: [PATCH] initial-setup add zh_CN.po Support Chinese translation Signed-off-by: wangqing --- initial-setup-add-zh_CN-po.patch | 132 ++++++++++++++++++++ initial-setup-fix-translantion-fialed.patch | 63 ++++++++++ initial-setup.spec | 14 ++- 3 files changed, 207 insertions(+), 2 deletions(-) create mode 100644 initial-setup-add-zh_CN-po.patch create mode 100644 initial-setup-fix-translantion-fialed.patch diff --git a/initial-setup-add-zh_CN-po.patch b/initial-setup-add-zh_CN-po.patch new file mode 100644 index 0000000..83e10d9 --- /dev/null +++ b/initial-setup-add-zh_CN-po.patch @@ -0,0 +1,132 @@ +From e3ded74c52be4783e4f1fa076f72b0459aed2398 Mon Sep 17 00:00:00 2001 +From: wangqing +Date: Mon, 20 Dec 2021 13:41:49 +0800 +Subject: [PATCH] initial-setup add zh_CN.po Support Chinese translation + +Signed-off-by: wangqing + +diff --git a/po/zh_CN.po b/po/zh_CN.po +new file mode 100644 +index 0000000..6f5e514 +--- /dev/null ++++ b/po/zh_CN.po +@@ -0,0 +1,116 @@ ++# SOME DESCRIPTIVE TITLE. ++# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER ++# This file is distributed under the same license as the PACKAGE package. ++# ++# Translators: ++# Tommy He , 2013 ++# Wei Liu , 2014 ++# Tong Hui , 2016. #zanata ++# Ludek Janda , 2018. #zanata ++msgid "" ++msgstr "" ++"Project-Id-Version: PACKAGE VERSION\n" ++"Report-Msgid-Bugs-To: \n" ++"POT-Creation-Date: 2020-05-26 17:19+0200\n" ++"PO-Revision-Date: 2018-08-23 08:52+0000\n" ++"Last-Translator: Copied by Zanata \n" ++"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/initial-setup/language/zh_CN/)\n" ++"Language: zh_CN\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=1; plural=0;\n" ++"X-Generator: Zanata 4.6.2\n" ++ ++#: ../initial_setup/common.py:140 ++msgid "" ++"Are you sure you want to quit the configuration process?\n" ++"You might end up with an unusable system if you do. Unless the License agreement is accepted, the system will be rebooted." ++msgstr "" ++"您确定要退出配置过程?\n" ++"若是这样做,可能会得到一个无法使用的系统。除非同意许可授权,系统将重启。" ++ ++#: ../initial_setup/common.py:144 ++msgid "" ++"Are you sure you want to quit the configuration process?\n" ++"You might end up with unusable system if you do." ++msgstr "" ++"您确定要退出配置过程?\n" ++"若是这样做,您的系统可能无法使用。" ++ ++#: ../initial_setup/common.py:151 ++msgid "LICENSING" ++msgstr "许可证" ++ ++#: ../initial_setup/tui/spokes/eula.py:30 ++msgid "License information" ++msgstr "许可信息" ++ ++#. make the options aligned to the same column (the checkbox has the ++#. '[ ]' prepended) ++#: ../initial_setup/tui/spokes/eula.py:44 ++msgid "Read the License Agreement" ++msgstr "阅读许可协议" ++ ++#: ../initial_setup/tui/spokes/eula.py:47 ++msgid "I accept the license agreement." ++msgstr "我同意许可协议。" ++ ++#: ../initial_setup/tui/spokes/eula.py:64 ++#: ../initial_setup/gui/spokes/eula.py:91 ++msgid "License accepted" ++msgstr "许可证已接受" ++ ++#: ../initial_setup/tui/spokes/eula.py:64 ++#: ../initial_setup/gui/spokes/eula.py:91 ++msgid "License not accepted" ++msgstr "未接受许可证" ++ ++#: ../initial_setup/tui/hubs/initial_setup_hub.py:14 ++#, python-format ++msgid "Initial setup of %(product)s" ++msgstr "%(product)s 的初始配置" ++ ++#: ../initial_setup/tui/hubs/initial_setup_hub.py:16 ++msgid "Initial setup" ++msgstr "初始配置" ++ ++#: ../initial_setup/gui/spokes/eula.py:31 ++msgid "_License Information" ++msgstr "许可信息(_L)" ++ ++#: ../initial_setup/gui/spokes/eula.py:50 ++msgid "No license found. Please report this at http://bugzilla.redhat.com" ++msgstr "未找到许可。请汇报此问题至 http://bugzilla.redhat.com" ++ ++#: ../initial_setup/gui/spokes/eula.py:89 ++msgid "No license found" ++msgstr "未找到许可" ++ ++#: tmp/eula.glade.h:1 ++msgid "License Information" ++msgstr "许可信息" ++ ++#: tmp/eula.glade.h:2 ++msgid "License Agreement:" ++msgstr "许可协议:" ++ ++#: tmp/eula.glade.h:3 ++msgid "I _accept the license agreement." ++msgstr "我同意许可协议(_A)。" ++ ++#: tmp/initial_setup.glade.h:1 ++msgid "DISTRIBUTION SETUP" ++msgstr "发行版设置" ++ ++#: tmp/initial_setup.glade.h:2 ++msgid "INITIAL SETUP" ++msgstr "初始设置" ++ ++#: tmp/initial_setup.glade.h:3 ++msgid "_QUIT" ++msgstr "退出(Q)" ++ ++#: tmp/initial_setup.glade.h:4 ++msgid "_FINISH CONFIGURATION" ++msgstr "结束配置(F)" +-- +2.20.1 + diff --git a/initial-setup-fix-translantion-fialed.patch b/initial-setup-fix-translantion-fialed.patch new file mode 100644 index 0000000..ad66c94 --- /dev/null +++ b/initial-setup-fix-translantion-fialed.patch @@ -0,0 +1,63 @@ +From e8740322e401998c247fc6e387668d904afab815 Mon Sep 17 00:00:00 2001 +From: wangqing +Date: Wed, 31 Mar 2021 16:19:50 +0800 +Subject: [PATCH] initial setup fix translantion fialed + + +diff --git a/initial_setup/common.py b/initial_setup/common.py +index ce7a144..055406c 100644 +--- a/initial_setup/common.py ++++ b/initial_setup/common.py +@@ -4,7 +4,7 @@ import os + + from pyanaconda.ui.common import collect + from pyanaconda.core.constants import FIRSTBOOT_ENVIRON +-from pyanaconda.core.i18n import N_ ++from initial_setup.i18n import _ + from pyanaconda.ui.categories import SpokeCategory + + from initial_setup.product import eula_available +@@ -137,15 +137,15 @@ def os_bug_report_url(filename='/etc/os-release'): + + def get_quit_message(): + if eula_available(): +- return N_("Are you sure you want to quit the configuration process?\n" ++ return _("Are you sure you want to quit the configuration process?\n" + "You might end up with an unusable system if you do. Unless the " + "License agreement is accepted, the system will be rebooted.") + else: +- return N_("Are you sure you want to quit the configuration process?\n" ++ return _("Are you sure you want to quit the configuration process?\n" + "You might end up with unusable system if you do.") + + class LicensingCategory(SpokeCategory): + displayOnHubGUI = "ProgressHub" + displayOnHubTUI = "SummaryHub" + sortOrder = 100 +- title = N_("LICENSING") ++ title = _("LICENSING") +diff --git a/initial_setup/gui/spokes/eula.py b/initial_setup/gui/spokes/eula.py +index 564edf7..e597ef7 100644 +--- a/initial_setup/gui/spokes/eula.py ++++ b/initial_setup/gui/spokes/eula.py +@@ -8,7 +8,7 @@ from pykickstart.constants import FIRSTBOOT_RECONFIG + + from initial_setup.product import eula_available, get_license_file_name + from initial_setup.common import LicensingCategory +-from initial_setup.i18n import _, N_ ++from initial_setup.i18n import _ + + log = logging.getLogger("initial-setup") + +@@ -28,7 +28,7 @@ class EULASpoke(FirstbootOnlySpokeMixIn, NormalSpoke): + helpFile = "InitialSetupHub.xml" + + icon = "application-certificate-symbolic" +- title = N_("_License Information") ++ title = _("_License Information") + category = LicensingCategory + translationDomain = "initial-setup" + +-- +2.20.1 + diff --git a/initial-setup.spec b/initial-setup.spec index f622ea0..13dc169 100644 --- a/initial-setup.spec +++ b/initial-setup.spec @@ -1,11 +1,15 @@ Name: initial-setup Version: 0.3.83 -Release: 2 +Release: 3 Summary: Initialize system configuration for a newly installed computer License: GPLv2+ URL: https://github.com/rhinstaller/initial-setup Source0: https://github.com/rhinstaller/initial-setup/archive/r0.3.83-1.tar.gz + Patch9001: initial-setup-add-support-openeuler.patch +Patch9002: initial-setup-fix-translantion-fialed.patch +Patch9003: initial-setup-add-zh_CN-po.patch + %define debug_package %{nil} @@ -39,6 +43,8 @@ make test %install %make_install +%find_lang %{name} + %clean rm -rf %{buildroot} @@ -51,7 +57,7 @@ rm -rf %{buildroot} %postun %systemd_postun %{name}.service -%files +%files -f %{name}.lang %doc README.rst COPYING %{python3_sitelib}/{initial_setup*,initial_setup/gui/*} %{_libexecdir}/%{name}/{run-initial-setup,firstboot-windowmanager,reconfiguration-mode-enabled} @@ -62,6 +68,10 @@ rm -rf %{buildroot} %config %{_sysconfdir}/%{name}/conf.d/* %changelog +* Mon Dec 20 2021 wangqing - 0.3.83-3 +- initial-setup add zh_CN.po Support Chinese translation +- fix translation failed + * Tue Dec 14 2021 wangkai - 0.3.83-2 - Remove old failing pre scriptlet -- Gitee