From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id SPiwEwWBOmcsdAEAe85BDQ:P1 (envelope-from ) for ; Sun, 17 Nov 2024 23:49:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id SPiwEwWBOmcsdAEAe85BDQ (envelope-from ) for ; Mon, 18 Nov 2024 00:49:25 +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=FdDrJUWb; dkim=fail ("headers rsa verify failed") header.d=pelzflorian.de header.s=key2 header.b=WvFOPIIR; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731887365; 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=3LIMpSVGQTjk6vc3MXMxGIY11tcnlELxt0pblQUrmQQ=; b=Y4W11CHkjmBsRSH87A/ZOC/fTxNXOgU29dnKLvFnLE5JlgHxYeOADZfZobhlxh0QAp0qO3 J8ju+Yc5p5VTTLvklwdiJ+HGTXAqyXlKW5LnDo8igOqbWExH69LKFsd69mG6ybU9paR557 sAQdYdTagpnF7s0D58U2QZC9yCYDPjezOCHx+xDDjqZN8dRR1bQcUoKb+26bLpJ7/dhGq2 rvaifhEeWFp5MYddR5K8d6hk8jzDydwRsvpwngMJz+qQPJ7Es/a0AR6XXbOnbR4xu6l9m1 M9KwXoQ36Xwb4aSmR7zJ7hAZSRVjuVCJH3wCI9IWdhgSH9DphKFP3CJYBWOTzA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=FdDrJUWb; dkim=fail ("headers rsa verify failed") header.d=pelzflorian.de header.s=key2 header.b=WvFOPIIR; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731887365; a=rsa-sha256; cv=none; b=eTfPSr3I4Moi6mv7kHZAOJPRB68Xlkt4QnZGOuOu4X3VjmyMX2rIdrdI3qtekWJPlnXfm0 QyrHSlUry+G4Gxkxk3BXz6zHBi7nmOGIgP5/o0DDh0QQupvONBQ1Xcs6GqGc5yV+QB+pqy MFOYbxsu8rswuMCdymRtwVBIOo6Am+NazHZccKxj3a54zfpcjJR3fJrlkiNPvXSRe/eva8 e6vqFzDLbqdmI0NEWKkK7TgWk8ddX0Nl07VcvSBkebYmPOH2lqc8W0pAm0xqzNVXwB1MXq pCf3WBeSupE0WntJMdSmk7J6YuaFfoezdwDuvLdnqwMFL+QWtdCooZabjosW1w== 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 A97E14396D 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 1tCp0t-0001TG-JF; Sun, 17 Nov 2024 18:49:07 -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 1tCp0r-0001Rz-6d for guix-patches@gnu.org; Sun, 17 Nov 2024 18:49:05 -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 1tCp0q-0001c9-6J; Sun, 17 Nov 2024 18:49:04 -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=3LIMpSVGQTjk6vc3MXMxGIY11tcnlELxt0pblQUrmQQ=; b=FdDrJUWb7oYjcosUSdoIeADFXA1HvdVnSBezCwRR5BGIYvq1epbipHkJmAfu3QppxjjIjRhlGsu6W6XmjgRMmu+n0oQGx7CHnk8L6gTFbmBXDdY+jrUOnPWEbYp3dZ38BKvrSrVqRCm+PWFcTsSG+MhQIIyPVLX0Qs0PZukxjOqEe+YZV8KwQlfE+6vOINdeUfjUISlTvcJjH3TsHUuOTUrlTwa3ESXTwHnMbzMaIxjUO6bL9FFk+l9mR6ykO9A+KrFtX9cvO//F3Ryl+yrtG0kDaF+/PZsCrPc0fL3f+o8EtQdX0dbrXnpnmUtPj2NzwR2OjoCE75va1yHHDdWb0A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCp0p-0005wH-23; Sun, 17 Nov 2024 18:49:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74190] [PATCH v2 2/3] install: Change the territory when we have learned it. Resent-From: Florian Pelz Original-Sender: "Debbugs-submit" Resent-CC: dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, guix-patches@gnu.org Resent-Date: Sun, 17 Nov 2024 23:49:03 +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 , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe X-Debbugs-Original-Xcc: Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe Received: via spool by 74190-submit@debbugs.gnu.org id=B74190.173188732422792 (code B ref 74190); Sun, 17 Nov 2024 23:49:03 +0000 Received: (at 74190) by debbugs.gnu.org; 17 Nov 2024 23:48:44 +0000 Received: from localhost ([127.0.0.1]:59119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCp0W-0005vY-B4 for submit@debbugs.gnu.org; Sun, 17 Nov 2024 18:48:44 -0500 Received: from relay.yourmailgateway.de ([188.68.63.162]:59215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCp0U-0005vP-4I for 74190@debbugs.gnu.org; Sun, 17 Nov 2024 18:48:42 -0500 Received: from mors-relay-8201.netcup.net (localhost [127.0.0.1]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4Xs6sP3Dt1z3wCb for <74190@debbugs.gnu.org>; Mon, 18 Nov 2024 00:48:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1731887321; bh=r+2yZ5t8NwcD2Z22g8fUwQWx7M6kMA1BoMZAqCj5VAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WvFOPIIRAYn2+4KSPwU9qXlR3BwsiM6Hn5DUauiF1wMph3NtMWM0NWyHMSS4/GHQe xq0+SGgn8lo36Kl2WzUKg6lE18JWpi8K+Ve9wkzzKPtYukaWlrn/zEreUL0K66Rs2/ PZFH1H0W8Whio2jtKb+nURjdhV0Fwhd+lm+mO9aXFz/RMNB6wBV79lexsaUqFTPbm+ 7q4dj1/y4a0iXBnXx9rgwvBMVuoSHfDTOXIRh6KAY2yIc+GIaaAXpS2mk6pFnEF0qM ow5hhUhCYg7AWNVpVjS1Sjg4G7G2FSAcMIS+UWL6EOvsEcoOBydLGrr2kN9WqqULvs i1CmyB2gFuUxw== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4Xs6sP2474z3qcN for <74190@debbugs.gnu.org>; Mon, 18 Nov 2024 00:48:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net 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 policy01-mors.netcup.net (Postfix) with ESMTPS id 4Xs6sN56b7z8t4M for <74190@debbugs.gnu.org>; Mon, 18 Nov 2024 00:48:40 +0100 (CET) Received: from florianhp.fritz.box (ipb218687b.dynamic.kabel-deutschland.de [178.24.104.123]) by mxe217.netcup.net (Postfix) with ESMTPSA id 88A1B841DA; Mon, 18 Nov 2024 00:48:35 +0100 (CET) From: Florian Pelz Date: Mon, 18 Nov 2024 00:48:46 +0100 Message-ID: <03b8e561289d30b4af84ff1392eb27a51609dba3.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: 88A1B841DA X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: XQCFIkbNPuJDbcwW9/if4GZzUFfJ/ogWy/mO54fuK9dXFoTvyHuCNp8n 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 0.61 X-Spam-Score: 0.61 X-Migadu-Queue-Id: A97E14396D X-TUID: XTkh7fBeIDba Typically, the LANGUAGE has already been set in the run-language-page step. But for languages like pt, we must know the territory. * gnu/installer/newt/locale.scm (run-territory-page): Call ‘setenv’ for the ‘LANGUAGE’ variable. Change-Id: Ie6308c359e0bdb2d37fac0c844cfd879e96e231a --- Note: I’ve tested this in QEMU and with it, a zh_CN, pt_BR locale gets applied visibly. Also, it repeats exactly what was done in ‘run-language-page’. Context: when the installer enters the encompassing ‘run-locale-page’ procedure, it runs the installer sub-steps ‘run-language-page’ and ‘run-territory-page’ in immediate succession with no way to go back just one sub-step. Esperanto does not go through ‘run-territory-page’ and is not broken by this change. gnu/installer/newt/locale.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gnu/installer/newt/locale.scm b/gnu/installer/newt/locale.scm index 0be9db449e..df168baca9 100644 --- a/gnu/installer/newt/locale.scm +++ b/gnu/installer/newt/locale.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2018 Mathieu Othacehe ;;; Copyright © 2019 Ludovic Courtès ;;; Copyright © 2024 Janneke Nieuwenhuizen +;;; Copyright © 2024 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,9 +25,6 @@ (define-module (gnu installer newt locale) #:use-module (gnu installer newt page) #:use-module (guix i18n) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:use-module (srfi srfi-34) - #:use-module (srfi srfi-35) #:use-module (ice-9 match) #:export (run-locale-page)) @@ -52,16 +50,22 @@ (define (run-language-page languages language->text) result) (define (run-territory-page territories territory->text) - (let ((title (G_ "Locale location"))) + (define result (run-listbox-selection-page - #:title title + #:title (G_ "Locale location") #:info-text (G_ "Choose a territory for this language.") #:listbox-items territories #:listbox-item->text territory->text #:button-text (G_ "Back") #:button-callback-procedure (lambda _ - (abort-to-prompt 'installer-step 'abort))))) + (abort-to-prompt 'installer-step 'abort)))) + + ;; Some languages, such as pt, cannot be installed early in the + ;; run-language-page step. Install them now, when we know the territory. + (setenv "LANGUAGE" (string-append (getenv "LANGUAGE") "_" result)) + + result) (define (run-codeset-page codesets) (let ((title (G_ "Locale codeset"))) -- 2.46.0