[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1017435: debian-installer: georgian text mode fails to render all characters



On 01/01/2023 20:49, Holger Wansing wrote:
Hi,

Samuel Thibault <sthibault@debian.org> wrote (Sun, 1 Jan 2023 20:14:36 +0100):
Hello,

Holger Wansing, le mar. 16 août 2022 22:59:34 +0200, a ecrit:
Philip Hands <phil@hands.com> wrote (Tue, 16 Aug 2022 11:22:30 +0200):
openQA just noticed that the rendering of certain characters just changed,
highlighting the fact that the rendering was already broken.
...
The solution is simply to add the required characters in
debian-installer/build/needed-characters/ka.utf:

So, we need a Georgian translator, providing us a file with all non-ascii
characters needed for the Georgian language.

Can anyone help us, please?

With the attached script you can generate a list of all characters that are used in the translations. That can be used to determine the minimal set of required characters.

With kind regards,
Roland Clobus
import re

# Generate a list of all characters that are used in translations
#
# Generate the file templates.dat as follows:
# 1) Boot an image with the debian-installer
# 2) Proceed until the end, but do not 'Finish' yet
# 3) Open a console
# 4) cp /var/lib/cdebconf/templates.dat /target
# 5) chroot /target
# 6) scp templates.dat some_user@example.com:/path_of_git_workdirectory_of_debian-installer
#
# Run this script:
# 1) cd path_of_git_workdirectory_of_debian-installer
# 2) python3 chars.py
#
# Carefully evaluate the proposed modifications in build/needed-characters

write_to_file = True
dump_to_console = True

file = open("templates.dat", "r")
content = file.read()
file.close()

lines = content.split("\n")

active_language = "C"
chars = dict();
for line in lines:
	# Sample:
	# Description-am.UTF-8: የሚጫኑ የተካይ አካሎች፦
	match = re.split("\w+-(\w+).UTF-8: (.*)", line)
	if (len(match) > 2): # A translated text
		language = match[1]
		translation = match[2]
		for char in translation:
			if not language in chars:
				chars[language] = set(());
			if ord(char) >= 128: # Add only non-ASCII characters
				chars[language].add(char)

if write_to_file:
	for language in sorted(chars):
		file = open("build/needed-characters/" + language + ".utf", "w")
		file.write(''.join(sorted(chars[language])))
		file.close()

if dump_to_console:
	for language in sorted(chars):
		print(f"Language: {language}")
		print(f"Characters: {''.join(sorted(chars[language]))}")

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: