diff mbox series

[v3,4/4] i18n: transfer variables into placeholders in command synopsis

Message ID b8e80e178eeb2fccd9e10d783c7cf4b5f4cc80e4.1643580113.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Factorize i18n | expand

Commit Message

Jean-Noël Avila Jan. 30, 2022, 10:01 p.m. UTC
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>

This applies the style guide for documentation.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
 builtin/fast-export.c | 2 +-
 builtin/reflog.c      | 4 ++--
 builtin/rev-list.c    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Phillip Wood Jan. 31, 2022, 11 a.m. UTC | #1
On 30/01/2022 22:01, Jean-Noël Avila via GitGitGadget wrote:
> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
> 
> This applies the style guide for documentation.

I don't really understand the title of this patch. Should 'transfer' be 
'transform'? All the changes look fine but seem to be two sorts of 
changes mixed together
  - adding '<>' around arguments where they are missing
  - converting plurals followed by '...' into singulars followed by '...'

Best Wishes

Phillip

> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> ---
>   builtin/fast-export.c | 2 +-
>   builtin/reflog.c      | 4 ++--
>   builtin/rev-list.c    | 2 +-
>   3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/builtin/fast-export.c b/builtin/fast-export.c
> index 9f1c730e587..510139e9b54 100644
> --- a/builtin/fast-export.c
> +++ b/builtin/fast-export.c
> @@ -26,7 +26,7 @@
>   #include "commit-slab.h"
>   
>   static const char *fast_export_usage[] = {
> -	N_("git fast-export [rev-list-opts]"),
> +	N_("git fast-export [<rev-list-opts>]"),
>   	NULL
>   };
>   
> diff --git a/builtin/reflog.c b/builtin/reflog.c
> index ee5ee8d8cf6..343a10d371b 100644
> --- a/builtin/reflog.c
> +++ b/builtin/reflog.c
> @@ -17,10 +17,10 @@ static const char reflog_expire_usage[] =
>   N_("git reflog expire [--expire=<time>] "
>      "[--expire-unreachable=<time>] "
>      "[--rewrite] [--updateref] [--stale-fix] [--dry-run | -n] "
> -   "[--verbose] [--all] <refs>...");
> +   "[--verbose] [--all] <ref>...");
>   static const char reflog_delete_usage[] =
>   N_("git reflog delete [--rewrite] [--updateref] "
> -   "[--dry-run | -n] [--verbose] <refs>...");
> +   "[--dry-run | -n] [--verbose] <ref>...");
>   static const char reflog_exists_usage[] =
>   N_("git reflog exists <ref>");
>   
> diff --git a/builtin/rev-list.c b/builtin/rev-list.c
> index 777558e9b06..38528c7f156 100644
> --- a/builtin/rev-list.c
> +++ b/builtin/rev-list.c
> @@ -20,7 +20,7 @@
>   #include "packfile.h"
>   
>   static const char rev_list_usage[] =
> -"git rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
> +"git rev-list [<options>] <commit-id>... [-- <path>...]\n"
>   "  limiting output:\n"
>   "    --max-count=<n>\n"
>   "    --max-age=<epoch>\n"
Jean-Noël Avila Jan. 31, 2022, 1:36 p.m. UTC | #2
Le 31/01/2022 à 12:00, Phillip Wood a écrit :
> On 30/01/2022 22:01, Jean-Noël Avila via GitGitGadget wrote:
>> From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
>>
>> This applies the style guide for documentation.
> 
> I don't really understand the title of this patch. Should 'transfer' be 
> 'transform'? All the changes look fine but seem to be two sorts of 
> changes mixed together
>   - adding '<>' around arguments where they are missing
>   - converting plurals followed by '...' into singulars followed by '...'
> 
> Best Wishes
> 
> Phillip
> 

TBH, this patch is a remaining of some changes performed while making 
the preceding one. They are the places that were false positive from the 
grep.

Fair enough, the changes are a little broader than advertised.

As for the plural forms transformed into singular forms, the coding 
guidelines is clear about repeated parameters of the same type, (e.g. 
<file>...), but some subsets of parameters are still preserved with 
plural, such as <options>, in which case they are not "atomic" (they may 
provide several cells in argv). This is not formalized atm.

My heuristic is that when the subset is not an array of a given type, 
but may be a collection of different types, we keep the plural. Maybe 
using another syntax for these "sub-expressions", along with a link to 
where to find them would help.


JN
diff mbox series

Patch

diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 9f1c730e587..510139e9b54 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -26,7 +26,7 @@ 
 #include "commit-slab.h"
 
 static const char *fast_export_usage[] = {
-	N_("git fast-export [rev-list-opts]"),
+	N_("git fast-export [<rev-list-opts>]"),
 	NULL
 };
 
diff --git a/builtin/reflog.c b/builtin/reflog.c
index ee5ee8d8cf6..343a10d371b 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -17,10 +17,10 @@  static const char reflog_expire_usage[] =
 N_("git reflog expire [--expire=<time>] "
    "[--expire-unreachable=<time>] "
    "[--rewrite] [--updateref] [--stale-fix] [--dry-run | -n] "
-   "[--verbose] [--all] <refs>...");
+   "[--verbose] [--all] <ref>...");
 static const char reflog_delete_usage[] =
 N_("git reflog delete [--rewrite] [--updateref] "
-   "[--dry-run | -n] [--verbose] <refs>...");
+   "[--dry-run | -n] [--verbose] <ref>...");
 static const char reflog_exists_usage[] =
 N_("git reflog exists <ref>");
 
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 777558e9b06..38528c7f156 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -20,7 +20,7 @@ 
 #include "packfile.h"
 
 static const char rev_list_usage[] =
-"git rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
+"git rev-list [<options>] <commit-id>... [-- <path>...]\n"
 "  limiting output:\n"
 "    --max-count=<n>\n"
 "    --max-age=<epoch>\n"