!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

230 Members
https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture53 Servers

Load older messages


SenderMessageTime
2 Aug 2022
@ctem:matrix.orgctem Yes, it was mostly about package and module descriptions (e.g., output from nix search nixpkgs, etc.) 16:27:28
@whentze:matrix.orgWanja Hentze
  • the manual
16:27:30
@whentze:matrix.orgWanja Hentze * and the manual16:27:33
@infinisil:matrix.orginfinisilOh yeah manual is a big one16:28:04
@ctem:matrix.orgctemHere's a related issue: https://github.com/NixOS/nix/issues/684216:28:30
@ctem:matrix.orgctem

I was presented with the following SoN issue: "i18n and l10n are a big part of NGI0. Nixpkgs currently doesn't support this." The following is an excerpt from my response after an initial assessment:

I think this could do wonders for Nix ecosystem adoption in general. However, the scope of this particular issue is not quite clear to me, making it difficult to curate. It seems that all actionable tasks fall under the category of generated documentation, targeting the following components:

  • Package descriptions
    • Use case: nix search nixpkgs returns a list of packages with their descriptions (i.e., the value of each package’s lib.meta.description attribute). This could be expanded to accommodate descriptions for other locales (e.g., lib.meta.description.ja_JP or similar), defaulting to en_GB (or en_US, etc.), such that the locale specified by the user’s system (perhaps overridable by a new nix search option such as --locale) would be respected where available.
  • Module descriptions
    • Similarly, module man pages are generated from exposed option attributes such as description and example. Expanding these attributes as described above could allow generation of locale-appropriate man pages.

While I would consider it out of scope for this issue, the effort could be rounded out by implementing i18n for:

A note regarding NixOS itself (as opposed to its documentation): I don’t see anything to be done. With the existing impl, it seems that most use cases are accommodated:

  • The i18n module allows the system to support multiple locales. (Whether a given program supports a given locale, however, is a program-specific concern.)
  • The fontconfig module allows default fonts to be set for programs that support Fontconfig.
  • The font attribute of the console module allows for virtual console font substitution.
  • Many high-quality fonts including glyphs for many languages are packaged.
  • Keyboard layouts are configurable (e.g., with services.xserver.layout and console.useXkbConfig attributes).
  • The i18n module additionally provides Input Method Editor (IME) (e.g., fcitx) support.
  • Somewhat relatedly (to the overall localization experience):
    • The locale module allows the time zone and geographic coordinates to be set.
    • Multiple services for time synchronization (e.g., chrony) are available.

Prior art:

  • Home Manager introduced basic i18n support through gettext with Weblate-hosted translations. The effort is divided into three categories: CLI, modules, and glossary.
16:31:51
@ctem:matrix.orgctemSo, the question was to get Jon’s feeling regarding l10n infrastructure in Nixpkgs, but in retrospect, I agree it probably felt pretty random w/o context😅16:42:30
@profpatsch:augsburg.oneprofpatschctem: I recently learned that DeepL supports a glossary, so even if you wanted to translate the manual, you could give it a list of nix terms and their technical translation and let it translate the “stuff in between” automatically16:50:26
@ctem:matrix.orgctem
In reply to @profpatsch:augsburg.one
ctem: I recently learned that DeepL supports a glossary, so even if you wanted to translate the manual, you could give it a list of nix terms and their technical translation and let it translate the “stuff in between” automatically
Thanks! That’s not something I’d considered.
16:52:48
@ctem:matrix.orgctemWould this be expected of the user? From the docs: "With the DeepL API Free plan, you can translate up to 500,000 characters per month for free." There’s also the issue that it isn’t open-source/self-hostable. I’m struggling to understand how this would integrate with Nix documentation CI/CD.16:59:08
@ctem:matrix.orgctemOr perhaps we could set up the conventional infrastructure for community-contributed translations (e.g., with Weblate), and use DeepL in the beginning to generate starting content in bulk...17:15:22
@qyliss:fairydust.spaceAlyssa RossSurely people can machine translate things themselves if they want a machine translation17:22:58
@qyliss:fairydust.spaceAlyssa Rossthe hard part with translation imo is keeping it up to date17:24:13
@qyliss:fairydust.spaceAlyssa Rossit's one thing to get a one-off translation done, but it's quite another to have people keeping it up to date with the authoratative source17:24:46
@qyliss:fairydust.spaceAlyssa Rossand if it's not up to date, it ends up being potentially worse than no translation, because people will learn outdated practices etc 17:25:18
@ctem:matrix.orgctemI don’t have much experience in this area, but for example with gettext, it’s my understanding that translated strings are identified by the authoritative originals, falling back to those originals where a match isn’t found for the specified locale. It seems that (implemented correctly) this would prevent the issue of outdated translations. (Whether this holds up in practice, however, I can’t say.)17:30:12
@ctem:matrix.orgctemBut then it would result in patchy, half-translated docs for all but the most popular languages.17:31:34
@ctem:matrix.orgctem(I think this is the norm for many for whom English is a second language, though.)17:32:34
@qyliss:fairydust.spaceAlyssa Rossgettext is very different to full length prose manuals17:33:25
@infinisil:matrix.orginfinisilI like the idea of using deepl as a starting point17:34:20
@infinisil:matrix.orginfinisilMaybe it should be marked as "machine-translated" though17:34:32
@infinisil:matrix.orginfinisilAnd when an actual person goes and checks/corrects it, that label could be removed17:35:02
@ctem:matrix.orgctemI see. So the DeepL recommendation was exclusive to the manuals, which otherwise would require full, up-to-date translations.17:35:09
@whentze:matrix.orgWanja Hentzewhile I'm 100% behind application localization (after all, english is not my first language and I probably wouldn't have started using computer if they were all in english), developer-only docs are a different story17:36:51
@whentze:matrix.orgWanja Hentzedo we expect people who don't know english to be able to contribute back, including docs? if so, and if the authoritative version of docs remains english, how do we do that? deepl backwards also?17:37:28
@whentze:matrix.orgWanja Hentzethough the manual is kind of both - it also targets day to day NixOS users, not just developers17:39:39
@ctem:matrix.orgctem
In reply to @whentze:matrix.org
do we expect people who don't know english to be able to contribute back, including docs? if so, and if the authoritative version of docs remains english, how do we do that? deepl backwards also?

This exposes the more fundamental issue that contributions have to be prepared in a language that maintainers can understand. As with the typical statement found in legal documentation—"In case of discrepancy between the English version of these Terms and any translated version, the English version shall prevail"—documentation translation contributions (e.g., via Weblate) tends to be based on an ‘honor system’ because maintainers can’t confirm accuracy with complete certainty.

For that reason, I think it’s reasonable to expect contributors to have a level of fluency in the project’s dominant language.

18:10:53
@whentze:matrix.orgWanja HentzeI tend to agree18:11:41
@ctem:matrix.orgctem
In reply to @whentze:matrix.org
do we expect people who don't know english to be able to contribute back, including docs? if so, and if the authoritative version of docs remains english, how do we do that? deepl backwards also?
*

This exposes the more fundamental issue that contributions have to be prepared in a language that maintainers can understand. As with the typical statement found in legal documentation—"In case of discrepancy between the English version of these Terms and any translated version, the English version shall prevail"—documentation translation contributions (e.g., via Weblate) tend to be based on an ‘honor system’ because maintainers can’t confirm accuracy with complete certainty.

For that reason, I think it’s reasonable to expect contributors to have a level of fluency in the project’s dominant language.

18:11:46
@k900:0upti.meK900 FWIW, as someone who's bilingual in a "weirder" language (specifically Russian), machine translation is awful 18:12:30

Show newer messages


Back to Room ListRoom Version: 9