!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

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

Load older messages


SenderMessageTime
2 Aug 2022
@whentze:matrix.orgWanja Hentzeand while I'm personally very familiar with sexprs, I think they represent "weird new syntax" for most folks14:58:17
@infinisil:matrix.orginfinisilCurrently listening to the Summer of Nix live talk "The Architecture and History of Nixpkgs" https://www.youtube.com/watch?v=TKgHazs3AMw15:21:37
@infinisil:matrix.orginfinisilNot that much about nixpkgs architecture as of yet thouggh15:22:12
@a-kenji:matrix.orga-kenji joined the room.15:53:13
@denna:matrix.orgdenna joined the room.15:54:15
@ctem:matrix.orgctem joined the room.16:12:16
@whentze:matrix.orgWanja Hentze
In reply to @infinisil:matrix.org
Currently listening to the Summer of Nix live talk "The Architecture and History of Nixpkgs" https://www.youtube.com/watch?v=TKgHazs3AMw
the question about localization somebody just asked is weird to me
16:25:25
@whentze:matrix.orgWanja Hentzeisn't the software packaged by nixpkgs localized already?16:25:46
@infinisil:matrix.orginfinisil I'm guessing it's localization of e.g. meta.description, NixOS option descriptions, eval error messages, etc. 16:26:25
@infinisil:matrix.orginfinisilThat's about the most nixpkgs could do16:26:41
@whentze:matrix.orgWanja Hentzeand maybe the output of some scripts that are original in nixpkgs?16:27:19
@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

Show newer messages


Back to Room ListRoom Version: 9