unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* zh-CN or zh-cn for the Guix manual URL?
@ 2024-09-05 12:55 Christopher Baines
  2024-09-05 15:39 ` pelzflorian (Florian Pelz)
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2024-09-05 12:55 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

Hey,

It seems like the simple change I made to remove the endless
possibilities for manual URLs [1] has had some unintended consequences.

1: https://git.savannah.gnu.org/cgit/guix/maintenance.git/commit/?id=3de9f2119371038650045946ba6e7de6e90f68e5

Some have been fixed, but the links from the website to the manual are
still broken for some locales. This URL works [2] but this is what the
website header is linking to when you select 简体中文.

2: https://guix.gnu.org/manual/zh-cn/
3: https://guix.gnu.org/manual/zh-CN/

Any ideas how to fix this (and the other issues mentioned on IRC [4])?

4: https://logs.guix.gnu.org/guix/2024-09-05.log#132819

Thanks,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: zh-CN or zh-cn for the Guix manual URL?
  2024-09-05 12:55 zh-CN or zh-cn for the Guix manual URL? Christopher Baines
@ 2024-09-05 15:39 ` pelzflorian (Florian Pelz)
  2024-09-05 22:00   ` pelzflorian (Florian Pelz)
  0 siblings, 1 reply; 3+ messages in thread
From: pelzflorian (Florian Pelz) @ 2024-09-05 15:39 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guix-devel

Hello Christopher and again thank you for the initiative to get rid of
the duplicate locale in the URLs in maintenance.git.

After more thought, I suggest to only temporarily keep the optional
#:append-locale argument you added.

The problem is that @documentlanguage in Texinfo differs from the
locale sometimes.

The proper fix would be to make the header URL for manual and cookbook
translatable with Weblate.  This would use the same translation
functionality that is already used for all the links in the text below
the header.

diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm
index 58ffbe1..cf884fc 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -427,7 +427,10 @@ manual.
                                 (string-append "GNU Guix Manual "
                                                (latest-guix-version) ""))
                     #:active-item active-item
-                    #:url (guix-url "manual/" #:append-locale #t))
+                    ;; TRANSLATORS: This is the stable manual link in
+                    ;; the header bar.  Please choose the English (en)
+                    ;; manual or a more appropriate translation.
+                    #:url (G_ (guix-url "manual/en/" #:localize #f)))
          (C_ "website menu"
              (menu-item #:label "GNU Guix Manual (latest)"
                         #:active-item active-item

I will push such a change and adapt the translations directly in the PO
file, then revert your #:append-locale.  Later I will put the
translations on Weblate.

Regards,
Florian



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: zh-CN or zh-cn for the Guix manual URL?
  2024-09-05 15:39 ` pelzflorian (Florian Pelz)
@ 2024-09-05 22:00   ` pelzflorian (Florian Pelz)
  0 siblings, 0 replies; 3+ messages in thread
From: pelzflorian (Florian Pelz) @ 2024-09-05 22:00 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guix-devel

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:
> The problem is that @documentlanguage in Texinfo differs from the
> locale sometimes.

This was untrue.  @documentlanguage is the locale, but the locale in the
URL assigned in htmlxref is not capitalized, because it is a URL (?).
(In fact, URLs are case-sensitive, such as https://guix.gnu.org/zh-CN,
but anyway.)  Still, some website translations have no translated manual
or cookbook, as we discussed on IRC, so I made the change:

> I will push such a change and adapt the translations directly in the PO
> file, then revert your #:append-locale.

Done.

Regards,
Florian


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-05 22:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05 12:55 zh-CN or zh-cn for the Guix manual URL? Christopher Baines
2024-09-05 15:39 ` pelzflorian (Florian Pelz)
2024-09-05 22:00   ` pelzflorian (Florian Pelz)

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).