From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +PG3FwOBOmf3RQEA62LTzQ:P1 (envelope-from ) for ; Sun, 17 Nov 2024 23:49:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id +PG3FwOBOmf3RQEA62LTzQ (envelope-from ) for ; Mon, 18 Nov 2024 00:49:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ITTSiPRG; dkim=fail ("headers rsa verify failed") header.d=pelzflorian.de header.s=key2 header.b=VSEsiy6H; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731887363; a=rsa-sha256; cv=none; b=HnHMo7pbrPo6pbm8ixO+rp8JT+GjCBEoG8kVrQTdrIshH6DH99YKyfllZKJW7pzFTaMef4 MAQ2TCzX/NTlsEIf18iTi3F1JT6GuJ2ol2fxiIr8MkSa3yagIffXfwJ3DpoWX6xS6pHUh8 EpI+DAuNG/6ruHU2O+UsiQsjEmUNEe57mQK31VpDN9iGiRKaogOLgZ8xHDuhODlT3bCjLn HRFxsDazPnS0Kx2f4vTqvll+blNhgtWLKF3M8UOopGv2MnMVRzx1DVp1LjqjGEYmzFSlDG ly3iJCmjpokJI0d/sTb7vQp1N6jwjozCHeFNhPiCLSCck5inOcoWIePx/FEUpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=ITTSiPRG; dkim=fail ("headers rsa verify failed") header.d=pelzflorian.de header.s=key2 header.b=VSEsiy6H; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731887363; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=amJk9z7bkypC0MsBLwHuKdz5RyhA+FTcTjTjhLJIhpI=; b=hsqXgsYbJXP0U4NUiYbpVILQEbOlcQp3rj1NUwf74otcGzfVIpyfbk36qsSJy7vm8/JJpV 9d0ibuPYjUuTPeXH9mtcQx1rcJOiWDYn/aNwu1Ro6XD03m1j357v/mpQJsDgj7t1lHKJ1E twgzNPNoL5f7bCxZ832oJh5iHOuz6ydADzSeBxlxCTUWuih9B529yG/RWlgCQEDhoKtl01 ZHcxYuVmspWOfFmKPHq0z83YVBmcbUaGnHQ712Gy6N84EnvSol3xqoz3R3gdLsJu0ZJIa7 JwMuL5YFrOCXlLoERg0U/T6Cj1jZPXYJpf1AqrdAFuanQFljaTBsuj9VUFo50w== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 147C98D269 for ; Mon, 18 Nov 2024 00:49:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCp0q-0001Rr-LG; Sun, 17 Nov 2024 18:49:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tCp0q-0001Rh-04 for guix-patches@gnu.org; Sun, 17 Nov 2024 18:49:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCp0p-0001c6-NY for guix-patches@gnu.org; Sun, 17 Nov 2024 18:49:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=amJk9z7bkypC0MsBLwHuKdz5RyhA+FTcTjTjhLJIhpI=; b=ITTSiPRGr4hRUxqtLxoVFp+3NqTTI+c0H/Uu6R3tGuIP/BamAfNKTj0n9ilBG5qi+Z9IR8Ia2VBpm7wJUj9oeRF109P6KS6P4H1MKdbdRe3CzbRYqJHdBc0/4ly/P9VtxKp2l4JzNLK6zjzqjw/jTpiZJq6VE3q/bTIUHIQn3oVSTqS5Ibac/c7QjZfGxmfPNwt2h8eJEVRqefsGeWtmcbDCJHMoH0uUXqPvkrekP9K29lzEBoMqgPMt/Q5Z/NNHpxZjMEk2abnM/d716hOGE9ikzq9UsIOSYhah4+ksWi4+9vRCD3SKv0QNu/54hUK0Y/pWSTs4i5gXjNLdj7BWaw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCp0o-0005wA-K6 for guix-patches@gnu.org; Sun, 17 Nov 2024 18:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74190] [PATCH v2 1/3] install: Open info manuals that have region codes. Resent-From: Florian Pelz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 Nov 2024 23:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74190 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74190@debbugs.gnu.org Cc: Florian Pelz Received: via spool by 74190-submit@debbugs.gnu.org id=B74190.173188730022752 (code B ref 74190); Sun, 17 Nov 2024 23:49:02 +0000 Received: (at 74190) by debbugs.gnu.org; 17 Nov 2024 23:48:20 +0000 Received: from localhost ([127.0.0.1]:59113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCp07-0005us-Ko for submit@debbugs.gnu.org; Sun, 17 Nov 2024 18:48:20 -0500 Received: from relay.yourmailgateway.de ([46.38.247.119]:51061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCp04-0005ue-Lf for 74190@debbugs.gnu.org; Sun, 17 Nov 2024 18:48:18 -0500 Received: from mors-relay-8404.netcup.net (localhost [127.0.0.1]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4Xs6rv5wH2z83DS for <74190@debbugs.gnu.org>; Mon, 18 Nov 2024 00:48:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1731887295; bh=JfHGZAMwWt5r6yI8DnDRsGpctX8c3LKWwtpbZ221m6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VSEsiy6HAQSJXOnvVIs0svoGE4OQxUhOL34nBk+kDEybcU8UQhU4TwjJ6s8U02Fuz A873VNZksZ+GeHfpncAkp6FIDp2dx9Q1UITo2qxmtBkUqQVWP6TtbfnSM5LadalFbx K3anLAcMrfhPfi3EwYF2SSoKUHKgmuIDnwtMLqODj7VRpz81M0nyQUiUc6SueV4Gec /gfuAW1Wymx8zxTnwJRfrUVH6MV2SaDjcfXynCv1FJTXwgJjFxFcUm4XxjPthh3/2A vNtd1FKEoJP+7q/f87nUMFSKYthFYQH2GGqwquz4a2lR/80lNgVtIrg5lQnsrmW/bf /n0kMJh6auvMg== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4Xs6rv5YBQz4xHn for <74190@debbugs.gnu.org>; Mon, 18 Nov 2024 00:48:15 +0100 (CET) Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4Xs6rv43RSz8sWQ for <74190@debbugs.gnu.org>; Mon, 18 Nov 2024 00:48:14 +0100 (CET) Received: from florianhp.fritz.box (ipb218687b.dynamic.kabel-deutschland.de [178.24.104.123]) by mxe217.netcup.net (Postfix) with ESMTPSA id 78903841DA; Mon, 18 Nov 2024 00:48:09 +0100 (CET) From: Florian Pelz Date: Mon, 18 Nov 2024 00:48:16 +0100 Message-ID: <7f9cc4f5378a22f2fb2891403fbc4714bb5b8f34.1731881786.git.pelzflorian@pelzflorian.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 78903841DA X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: YBnJdVTXYC8DE1uxBh8YOCmsAClJfocHZzebFD0oJ1OHw2cGKrgWhcU8 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.39 X-Spam-Score: -4.39 X-Migadu-Queue-Id: 147C98D269 X-Migadu-Scanner: mx12.migadu.com X-TUID: 2sOcurSwmHPf Because pt_PT and pt_BR have many differences, such as how the word “file” gets translated, Guix’ pt_BR info manual is called (guix.pt_BR) instead of (guix.pt). * gnu/system/install.scm (log-to-info): Try region coded manual file names. (%installation-node-names): Add node names for pt_BR and zh_CN. Change-Id: I89beebd323ee69ca83c22321c9d9e664b32cf6f3 --- gnu/system/install.scm | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 78a3cdaaec..4de903c59b 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice -;;; Copyright © 2020 Florian Pelz +;;; Copyright © 2020, 2024 Florian Pelz ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2022 Josselin Poiret ;;; Copyright © 2023 Herman Rimm @@ -31,11 +31,9 @@ (define-module (gnu system install) #:use-module (gnu bootloader u-boot) #:use-module (guix gexp) #:use-module (guix store) - #:use-module (guix monads) #:use-module (guix modules) #:use-module ((guix packages) #:select (package-version supported-package?)) #:use-module (guix platform) - #:use-module ((guix store) #:select (%store-prefix)) #:use-module (guix utils) #:use-module (gnu installer) #:use-module (gnu system locale) @@ -47,7 +45,6 @@ (define-module (gnu system install) #:use-module (gnu packages admin) #:use-module (gnu packages bash) #:use-module (gnu packages bootloaders) - #:use-module (gnu packages certs) #:use-module (gnu packages compression) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages disk) @@ -60,7 +57,6 @@ (define-module (gnu system install) #:use-module (gnu packages texinfo) #:use-module (gnu packages xorg) #:use-module (ice-9 match) - #:use-module (srfi srfi-26) #:export (installation-os a20-olinuxino-lime-installation-os a20-olinuxino-lime2-emmc-installation-os @@ -100,7 +96,9 @@ (define %installation-node-names ("en" . "System Installation") ("es" . "Instalación del sistema") ("fr" . "Installation du système") - ("ru" . "Установка системы"))) + ("pt_BR" . "Instalação do sistema") + ("ru" . "Установка системы") + ("zh_CN" . "系统安装"))) (define (log-to-info tty user) "Return a script that spawns the Info reader on the right section of the @@ -111,13 +109,22 @@ (define (log-to-info tty user) (locale (cadr (command-line))) (language (string-take locale (string-index locale #\_))) + (with-region (string-take locale + (string-index + locale + (char-set #\. #\/ #\@)))) (infodir "/run/current-system/profile/share/info") - (per-lang (string-append infodir "/guix." language - ".info.gz")) - (file (if (file-exists? per-lang) - per-lang - (string-append infodir "/guix.info"))) + (per-lang (lambda (code) + (string-append infodir "/guix." code + ".info.gz"))) + (file ((@ (srfi srfi-1) find) file-exists? + (list (per-lang with-region) + (per-lang language) + (string-append infodir + "/guix.info.gz")))) (node (or (assoc-ref '#$%installation-node-names + with-region) + (assoc-ref '#$%installation-node-names language) "System Installation"))) (redirect-port tty (current-output-port)) -- 2.46.0