Skip to content

Fundamentally improve German translations#3780

Merged
svartkanin merged 8 commits intoarchlinux:masterfrom
veprogames:translation-de
Sep 9, 2025
Merged

Fundamentally improve German translations#3780
svartkanin merged 8 commits intoarchlinux:masterfrom
veprogames:translation-de

Conversation

@veprogames
Copy link
Copy Markdown
Contributor

@veprogames veprogames commented Sep 5, 2025

PR Description:

poedit and archinstall now report 100% translation rate for German. I added tr() invocations in some places and adjusted the locale generation script to properly detect them (I didn't work for me before).

Tests and Checks

  • I have tested the TUI roughly

But there's a problem: Some translations are not picked up, for example "No audio server". I didn't figure out why, did I overlook something obvious? I ran the locale generation script before committing and the .mo file was changed.

Some translations also had a different amount of {}. I don't know if I broke something without noticing.

Should I regenerate all languages because the .pot changed?

@veprogames veprogames requested a review from Torxed as a code owner September 5, 2025 08:26
@veprogames veprogames marked this pull request as draft September 5, 2025 08:26
Bring translations closer to the English original, also removing some extraneous information. Get rid of all warnings poedit displayed. Correct translation that didn't match at all.
xgettext was not recognizing tr() invocations. Following https://stackoverflow.com/a/11901925 fixed the issue
Improve consistency with some translations. Add translations for messages that were just detected in the previous commit. Add translations for Graphics Drivers
Look for untranslated strings in the source files and add make them recognized by gettext
@veprogames
Copy link
Copy Markdown
Contributor Author

But there's a problem: Some translations are not picked up, for example "No audio server".

Is it because of this?

# the groups needs to be classmethods not static methods
# because they rely on the DeferredTranslation setup first;
# if they are static methods, they will be called before the
# translation setup is done

If so, I'd remove the tr calls from Enum values

Comment thread archinstall/lib/models/mirrors.py Outdated
Never = 'Never'
Optional = 'Optional'
Required = 'Required'
Never = tr('Never')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should translate this, it's the actual value stored in the mirror configuration

@svartkanin
Copy link
Copy Markdown
Collaborator

Regarding the audio, the tr(...) in the value doesn't make sense it would need a helper function

class Audio(StrEnum):
	NO_AUDIO = auto()
	PIPEWIRE = auto()
	PULSEAUDIO = auto()

	def display_text(self) -> str:
		match self:
			case Audio.NO_AUDIO:
				return tr('No audio server')
			case Audio.PIPEWIRE:
				return 'Pipewire'
			case Audio.PULSEAUDIO:
				return 'Pulseaudio'

feel free to ignore that for now

@veprogames
Copy link
Copy Markdown
Contributor Author

veprogames commented Sep 8, 2025

I removed the enum translations and did some final wording changes. Should I squash the commits? Is the change to locale_generator.sh ok? Are the leftover comments in de/LC_MESSAGES/base.po ok?

@veprogames veprogames marked this pull request as ready for review September 8, 2025 18:49
@svartkanin svartkanin merged commit de50a31 into archlinux:master Sep 9, 2025
9 checks passed
@svartkanin
Copy link
Copy Markdown
Collaborator

Thanks for the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants