diff options
author | EuAndreh <eu@euandre.org> | 2021-08-17 17:26:39 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-08-17 17:27:29 -0300 |
commit | d3eae3464fdd22c2459d85cfe04175c1d86bb231 (patch) | |
tree | 1c82edb4a737ff148c5b95813b4f1f37c495b9ef /src | |
parent | TODOs.md: Add #question-87b2068f-85dd-25e9-b0c6-5e41fbbb04ca (diff) | |
download | gistatic-d3eae3464fdd22c2459d85cfe04175c1d86bb231.tar.gz gistatic-d3eae3464fdd22c2459d85cfe04175c1d86bb231.tar.xz |
src/gistatic.c: Split alt messages of index and repository pages
Diffstat (limited to 'src')
-rw-r--r-- | src/gistatic.c | 58 | ||||
-rw-r--r-- | src/gistatic.msg | 46 |
2 files changed, 55 insertions, 49 deletions
diff --git a/src/gistatic.c b/src/gistatic.c index 8f33955..6dac369 100644 --- a/src/gistatic.c +++ b/src/gistatic.c @@ -47,34 +47,36 @@ static const char *const CATALOG_NAME = PROGNAME; static nl_catd catalog_descriptor = NULL; #define MSG_DEFAULT_TITLE 1 -#define MSG_LOGO_ALT 2 -#define MSG_FOOTER_TEMPLATE 3 -#define MSG_LANG 4 -#define MSG_NAME 5 -#define MSG_DESCRIPTION 6 -#define MSG_LAST_COMMIT 7 -#define MSG_USAGE 8 -#define MSG_HELP 9 -#define MSG_COMMIT_FEED 10 -#define MSG_TAGS_FEED 11 -#define MSG_NAV_FILES 12 -#define MSG_NAV_LOG 13 -#define MSG_NAV_REFS 14 -#define MSG_THEAD_BRANCH 15 -#define MSG_THEAD_COMMITMSG 16 -#define MSG_THEAD_AUTHOR 17 -#define MSG_THEAD_DATE 18 -#define MSG_THEAD_TAG 19 -#define MSG_THEAD_DOWNLOAD 20 -#define MSG_MISSING_URL 21 -#define MSG_MISSING_ARGS 22 -#define MSG_INCOMPATIBLE_OPTIONS 23 -#define MSG_ERR_NONDIRECT_REF 24 +#define MSG_LOGO_ALT_INDEX 2 +#define MSG_LOGO_ALT_REPOSITORY 3 +#define MSG_FOOTER_TEMPLATE 4 +#define MSG_LANG 5 +#define MSG_NAME 6 +#define MSG_DESCRIPTION 7 +#define MSG_LAST_COMMIT 8 +#define MSG_USAGE 9 +#define MSG_HELP 10 +#define MSG_COMMIT_FEED 11 +#define MSG_TAGS_FEED 12 +#define MSG_NAV_FILES 13 +#define MSG_NAV_LOG 14 +#define MSG_NAV_REFS 15 +#define MSG_THEAD_BRANCH 16 +#define MSG_THEAD_COMMITMSG 17 +#define MSG_THEAD_AUTHOR 18 +#define MSG_THEAD_DATE 19 +#define MSG_THEAD_TAG 20 +#define MSG_THEAD_DOWNLOAD 21 +#define MSG_MISSING_URL 22 +#define MSG_MISSING_ARGS 23 +#define MSG_INCOMPATIBLE_OPTIONS 24 +#define MSG_ERR_NONDIRECT_REF 25 static const char *const MSGS[] = { "", [MSG_DEFAULT_TITLE]="Repositories", - [MSG_LOGO_ALT]="Logo image of the repository list", + [MSG_LOGO_ALT_INDEX]="Logo image of the repository list", + [MSG_LOGO_ALT_REPOSITORY]="Logo image of the repository", [MSG_FOOTER_TEMPLATE]="Generated with %s", [MSG_LANG]="en", [MSG_NAME]="Name", @@ -1003,7 +1005,7 @@ static int index_write_header(FILE *const fd, const char *const idx_title) { " <tbody>\n", _(MSG_LANG), idx_title, - _(MSG_LOGO_ALT), + _(MSG_LOGO_ALT_INDEX), idx_title, _(MSG_NAME), _(MSG_DESCRIPTION), @@ -1397,7 +1399,9 @@ static int repo_write_refs( " <body>\n" " <header>\n" " <div class=\"header-horizontal-grouping\">\n" - " <img alt=\"%s\" class=\"logo\" src=\"logo.svg\" />\n" + " <a href=\"../\">\n" + " <img alt=\"%s\" class=\"logo\" src=\"logo.svg\" />\n" + " </a>\n" " <div class=\"header-description\">\n" " <h1>\n" " %s\n" @@ -1458,7 +1462,7 @@ static int repo_write_refs( _(MSG_TAGS_FEED), _(MSG_LANG), project_name, - _(MSG_LOGO_ALT), + _(MSG_LOGO_ALT_REPOSITORY), project_name, description, clone_url, diff --git a/src/gistatic.msg b/src/gistatic.msg index 9cf8dc9..200e7aa 100644 --- a/src/gistatic.msg +++ b/src/gistatic.msg @@ -2,50 +2,52 @@ 2 Logo image of the repository list -3 Generated with %s +3 Logo image of the repository -4 en +4 Generated with %s -5 Name +5 en -6 Description +6 Name -7 Last commit +7 Description -8 Usage: -h -o -i +8 Last commit + +9 Usage: -h -o -i -z -x... -9 help: ... +10 help: ... -10 commit feed +11 commit feed -11 tags feed +12 tags feed -12 files +13 files -13 log +14 log -14 refs +15 refs -15 Branch +16 Branch -16 Commit message +17 Commit message -17 Author +18 Author -18 Date +19 Date -19 Tag +20 Tag -20 Download +21 Download -21 Missing '-u CLONE_URL' +22 Missing '-u CLONE_URL' -22 Missing [PATH | [PATHS]] +23 Missing [PATH | [PATHS]] -23 Incompatible options -u and -i +24 Incompatible options -u and -i -24 Git reference is not direct +25 Git reference is not direct |