diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-06-08 14:46:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-06-08 14:46:24 +0200 |
commit | 8c3e9da13a3c92a7db308db8c0d81cb474ad7799 (patch) | |
tree | 88d06952aa5cc3a9c4991d9c43eb7950ff174fe1 /doc/contributing.texi | |
parent | 5439c04ebdb7b6405f5ea2446b375f1d155a8d95 (diff) | |
parent | 0c5299200ffcd16370f047b7ccb187c60f30da34 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'doc/contributing.texi')
-rw-r--r-- | doc/contributing.texi | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi index 207efc4ee6..e1902f120f 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -447,6 +447,7 @@ needed is to review and apply the patch. * Perl Modules:: Little pearls. * Java Packages:: Coffee break. * Rust Crates:: Beware of oxidation. +* Elm Packages:: Trees of browser code * Fonts:: Fond of fonts. @end menu @@ -898,6 +899,87 @@ developed for a different Operating System, depend on features from the Nightly Rust compiler, or the test suite may have atrophied since it was released. +@node Elm Packages +@subsection Elm Packages + +@cindex Elm +Elm applications can be named like other software: their names need not +mention Elm. + +Packages in the Elm sense (see @code{elm-build-system} under @ref{Build +Systems}) are required use names of the format +@var{author}@code{/}@var{project}, where both the @var{author} and the +@var{project} may contain hyphens internally, and the @var{author} sometimes +contains uppercase letters. + +To form the Guix package name from the upstream name, we follow a convention +similar to Python packages (@pxref{Python Modules}), adding an @code{elm-} +prefix unless the name would already begin with @code{elm-}. + +In many cases we can reconstruct an Elm package's upstream name heuristically, +but, since conversion to a Guix-style name involves a loss of information, +this is not always possible. Care should be taken to add the +@code{'upstream-name} property when necessary so that @samp{guix import elm} +will work correctly (@pxref{Invoking guix import}). The most notable scenarios +when explicitly specifying the upstream name is necessary are: + +@enumerate +@item +When the @var{author} is @code{elm} and the @var{project} contains one or more +hyphens, as with @code{elm/virtual-dom}; and + +@item +When the @var{author} contains hyphens or uppercase letters, as with +@code{Elm-Canvas/raster-shapes}---unless the @var{author} is +@code{elm-explorations}, which is handled as a special case, so packages like +@code{elm-explorations/markdown} do @emph{not} need to use the +@code{'upstream-name} property. +@end enumerate + +The module @code{(guix build-system elm)} provides the following utilities for +working with names and related conventions: + +@deffn {Scheme procedure} elm-package-origin @var{elm-name} @var{version} @ + @var{hash} +Returns a Git origin using the repository naming and tagging regime required +for a published Elm package with the upstream name @var{elm-name} at version +@var{version} with sha256 checksum @var{hash}. + +For example: +@lisp +(package + (name "elm-html") + (version "1.0.0") + (source + (elm-package-origin + "elm/html" + version + (base32 "15k1679ja57vvlpinpv06znmrxy09lbhzfkzdc89i01qa8c4gb4a"))) + ...) +@end lisp +@end deffn + +@deffn {Scheme procedure} elm->package-name @var{elm-name} +Returns the Guix-style package name for an Elm package with upstream name +@var{elm-name}. + +Note that there is more than one possible @var{elm-name} for which +@code{elm->package-name} will produce a given result. +@end deffn + +@deffn {Scheme procedure} guix-package->elm-name @var{package} +Given an Elm @var{package}, returns the possibly-inferred upstream name, or +@code{#f} the upstream name is not specified via the @code{'upstream-name} +property and can not be inferred by @code{infer-elm-package-name}. +@end deffn + +@deffn {Scheme procedure} infer-elm-package-name @var{guix-name} +Given the @var{guix-name} of an Elm package, returns the inferred upstream +name, or @code{#f} if the upstream name can't be inferred. If the result is +not @code{#f}, supplying it to @code{elm->package-name} would produce +@var{guix-name}. +@end deffn + @node Fonts @subsection Fonts @@ -1911,6 +1993,28 @@ Currently, some parts of Guix cannot be translated on Weblate, help wanted! translated. @end itemize +@subsubheading Conditions for Inclusion + +There are no conditions for adding new translations of the @code{guix} and +@code{guix-packages} components, other than they need at least one translated +string. New languages will be added to Guix as soon as possible. The +files may be removed if they fall out of sync and have no more translated +strings. + +Given that the web site is dedicated to new users, we want its translation +to be as complete as possible before we include it in the language menu. +For a new language to be included, it needs to reach at least 80% completion. +When a language is included, it may be removed in the future if it stays +out of sync and falls below 60% completion. + +The manual and cookbook are automatically added in the default compilation +target. Every time we synchronize translations, developers need to +recompile all the translated manuals and cookbooks. This is useless for what +is essentially the English manual or cookbook. Therefore, we will only +include a new language when it reaches 10% completion in the component. +When a language is included, it may be removed in the future if it stays +out of sync and falls below 5% completion. + @subsubheading Translation Infrastructure Weblate is backed by a git repository from which it discovers new strings to |