Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2225217pxj; Sun, 13 Jun 2021 13:01:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeztrMKVJJN3tp2kpbw2wFb3cmDBkClybvoXacJuo/9EcZ8NBcDMP4WVhWqsPKkkIc7QU6 X-Received: by 2002:aa7:d713:: with SMTP id t19mr13294483edq.144.1623614466257; Sun, 13 Jun 2021 13:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623614466; cv=none; d=google.com; s=arc-20160816; b=wiupaerMs5593RZiuxYFU7tKPME6oyrXe2UsM3VFrxqsxdV5UkQM+vY5raiAwVpUuK vvtDk8Jq5O0ws/n+Yl/qjJo3RH7QnUpf4nwk6rAF7M+nQFuz7Y7ubOqea/cgi3cAZ82X jyGs+47VQN56OX2A2KusjK8jt1S12wlLQgCAbZnfwIww1VI8R2ZfsIYvsNjHgjI+1rMP bjQtujvhZQnV7sCdzxp2m12P/5nF5I1TTJCgH+Xe47/2TeFfcgHhux/I4f8rCrC0ut5u 3fOuppfcVc/8jISijD+vbZa30L0dWxkbhvC6EsAIgrSS+hnSWpOuAPdnQpd4819P6NFq Hv/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:organization:content-disposition :mime-version:mail-followup-to:message-id:subject:cc:to:from:date; bh=ePf3yQjDuD+vuw5q8cOaut2clhy+UxPCvDPOfbszFcw=; b=d9Gstdkbz6+JDk8I0KCuHjBTWgIaeGW4ed6cv2Q6Oiij0NmOyy1rCoXf4egc2LRoAi mQpyX9bMZWzxCe7eRGDp37AoeNnhsyQh3oBNrFJGQg5CleDl6sawmWIFaH2DU/sS6SYb PzsSqc2oXL8lgm7KPK1x/tblP154cqphm41WyMpEdOQh4o52632VdgOoM0RxDfDttJWd dRjmzbGN9e1k4XpBe9DQGoOu6iJubIEcLMr5Lp3wwD1tqVfPMQ4Xx1QgCGGiQdXv4VcI Gx2EBIx8T/aOtjBjqBzkCM7+7WnWOJxK9lt5Ds8pySQ4PAsshSX/+VvZ4St4C2Oz2C+G +nYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f22si9755587ejj.302.2021.06.13.13.00.40; Sun, 13 Jun 2021 13:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231874AbhFMUBU (ORCPT + 99 others); Sun, 13 Jun 2021 16:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231788AbhFMUBT (ORCPT ); Sun, 13 Jun 2021 16:01:19 -0400 Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FAF3C061574 for ; Sun, 13 Jun 2021 12:59:17 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id CBAC5222; Sun, 13 Jun 2021 21:59:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EDEJtg76cm0w; Sun, 13 Jun 2021 21:59:11 +0200 (CEST) Received: from begin (unknown [IPv6:2a01:cb19:956:1b00:de41:a9ff:fe47:ec49]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 301D34F; Sun, 13 Jun 2021 21:59:11 +0200 (CEST) Received: from samy by begin with local (Exim 4.94.2) (envelope-from ) id 1lsWGE-004hMP-1D; Sun, 13 Jun 2021 21:59:10 +0200 Date: Sun, 13 Jun 2021 21:59:09 +0200 From: Samuel Thibault To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, speakup@linux-speakup.org, Trevor Astrope Subject: [speakup] Separate out translations for bright colors names Message-ID: <20210613195909.n7ssor6iqeo3pcno@begin> Mail-Followup-To: Samuel Thibault , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, speakup@linux-speakup.org, Trevor Astrope MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spamd-Bar: -- Authentication-Results: hera.aquilenet.fr X-Rspamd-Server: hera X-Rspamd-Queue-Id: CBAC5222 X-Spamd-Result: default: False [-2.50 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; BAYES_HAM(-3.00)[100.00%] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The existing code was assuming that bright color names can be forged by just prepending the "bright" word to the color name. But some langages may rather append it, or require completely different names ("grey" is actually already an example). From: Trevor Astrope Signed-off-by: Samuel Thibault Index: linux/drivers/accessibility/speakup/i18n.c =================================================================== --- linux.orig/drivers/accessibility/speakup/i18n.c +++ linux/drivers/accessibility/speakup/i18n.c @@ -90,6 +90,13 @@ static char *speakup_default_msgs[MSG_LA [MSG_COLOR_YELLOW] = "yellow", [MSG_COLOR_WHITE] = "white", [MSG_COLOR_GREY] = "grey", + [MSG_COLOR_BRIGHTBLUE] "bright blue", + [MSG_COLOR_BRIGHTGREEN] "bright green", + [MSG_COLOR_BRIGHTCYAN] "bright cyan", + [MSG_COLOR_BRIGHTRED] "bright red", + [MSG_COLOR_BRIGHTMAGENTA] "bright magenta", + [MSG_COLOR_BRIGHTYELLOW] "bright yellow", + [MSG_COLOR_BRIGHTWHITE] "bright white", /* Names of key states. */ [MSG_STATE_DOUBLE] = "double", Index: linux/drivers/accessibility/speakup/i18n.h =================================================================== --- linux.orig/drivers/accessibility/speakup/i18n.h +++ linux/drivers/accessibility/speakup/i18n.h @@ -99,7 +99,14 @@ enum msg_index_t { MSG_COLOR_YELLOW, MSG_COLOR_WHITE, MSG_COLOR_GREY, - MSG_COLORS_END = MSG_COLOR_GREY, + MSG_COLOR_BRIGHTBLUE, + MSG_COLOR_BRIGHTGREEN, + MSG_COLOR_BRIGHTCYAN, + MSG_COLOR_BRIGHTRED, + MSG_COLOR_BRIGHTMAGENTA, + MSG_COLOR_BRIGHTYELLOW, + MSG_COLOR_BRIGHTWHITE, + MSG_COLORS_END = MSG_COLOR_BRIGHTWHITE, MSG_STATES_START, MSG_STATE_DOUBLE = MSG_STATES_START, Index: linux/drivers/accessibility/speakup/main.c =================================================================== --- linux.orig/drivers/accessibility/speakup/main.c +++ linux/drivers/accessibility/speakup/main.c @@ -389,10 +389,6 @@ static void say_attributes(struct vc_dat int fg = spk_attr & 0x0f; int bg = spk_attr >> 4; - if (fg > 8) { - synth_printf("%s ", spk_msg_get(MSG_BRIGHT)); - fg -= 8; - } synth_printf("%s", spk_msg_get(MSG_COLORS_START + fg)); if (bg > 7) { synth_printf(" %s ", spk_msg_get(MSG_ON_BLINKING));