summaryrefslogtreecommitdiff
path: root/src/gempub.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-03 06:25:52 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-03 06:25:52 +0300
commit0336bc677685ad3c7765f6bb46d1b7e3d66935de (patch)
tree0527b057cf868ac68b7073d73cfe567a8ee9d107 /src/gempub.c
parent7584277f59646fb38c80242a2503176e073be367 (diff)
Lang: Added new and missing strings
IssueID #192
Diffstat (limited to 'src/gempub.c')
-rw-r--r--src/gempub.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gempub.c b/src/gempub.c
index 448349c8..c9b1c242 100644
--- a/src/gempub.c
+++ b/src/gempub.c
@@ -79,7 +79,7 @@ static iBool parseMetadata_Gempub_(iGempub *d) {
79 "cover:", 79 "cover:",
80 }; 80 };
81 /* Default values. */ 81 /* Default values. */
82 setCStr_String(&d->props[title_GempubProperty], "Untitled Book"); 82 setCStr_String(&d->props[title_GempubProperty], "${gempub.cover.untitled}");
83 setCStr_String(&d->props[cover_GempubProperty], 83 setCStr_String(&d->props[cover_GempubProperty],
84 entryCStr_Archive(d->arch, "cover.jpg") ? "cover.jpg" : 84 entryCStr_Archive(d->arch, "cover.jpg") ? "cover.jpg" :
85 entryCStr_Archive(d->arch, "cover.png") ? "cover.png" : ""); 85 entryCStr_Archive(d->arch, "cover.png") ? "cover.png" : "");
@@ -173,38 +173,38 @@ iString *coverPageSource_Gempub(const iGempub *d) {
173 appendFormat_String(out, "%s\n", cstr_String(&d->props[description_GempubProperty])); 173 appendFormat_String(out, "%s\n", cstr_String(&d->props[description_GempubProperty]));
174 } 174 }
175 appendCStr_String(out, "\n"); 175 appendCStr_String(out, "\n");
176 appendProperty_Gempub_(d, "Author:", author_GempubProperty, out); 176 appendProperty_Gempub_(d, "${gempub.meta.author}:", author_GempubProperty, out);
177 if (!isRemote_Gempub_(d)) { 177 if (!isRemote_Gempub_(d)) {
178 appendFormat_String(out, "\n=> %s " book_Icon " View Gempub contents\n", 178 appendFormat_String(out, "\n=> %s " book_Icon " ${gempub.cover.view}\n",
179 cstrCollect_String(concat_Path(baseUrl, &d->props[index_GempubProperty]))); 179 cstrCollect_String(concat_Path(baseUrl, &d->props[index_GempubProperty])));
180 if (hasProperty_Gempub_(d, cover_GempubProperty)) { 180 if (hasProperty_Gempub_(d, cover_GempubProperty)) {
181 appendFormat_String(out, "\n=> %s Cover image\n", 181 appendFormat_String(out, "\n=> %s ${gempub.cover.image}\n",
182 cstrCollect_String(concat_Path(baseUrl, &d->props[cover_GempubProperty]))); 182 cstrCollect_String(concat_Path(baseUrl, &d->props[cover_GempubProperty])));
183 } 183 }
184 } 184 }
185 else { 185 else {
186 iString *key = collectNew_String(); /* TODO: add a helper for this */ 186 iString *key = collectNew_String(); /* TODO: add a helper for this */
187 toString_Sym(SDLK_s, KMOD_PRIMARY, key); 187 toString_Sym(SDLK_s, KMOD_PRIMARY, key);
188 appendCStr_String(out, "\nThis Gempub book can be viewed after it has been saved locally. "); 188 appendCStr_String(out, "\n${gempub.cover.viewlocal} ");
189 appendFormat_String(out, 189 appendFormat_String(out,
190 cstr_Lang("error.unsupported.suggestsave"), 190 cstr_Lang("error.unsupported.suggestsave"),
191 cstr_String(key), 191 cstr_String(key),
192 saveToDownloads_Label); 192 saveToDownloads_Label);
193 translate_Lang(out);
194 appendCStr_String(out, "\n"); 193 appendCStr_String(out, "\n");
195 } 194 }
196 appendCStr_String(out, "\n## About this book\n"); 195 appendCStr_String(out, "\n## ${gempub.cover.aboutbook}\n");
197 appendProperty_Gempub_(d, "Version:", version_GempubProperty, out); 196 appendProperty_Gempub_(d, "${gempub.meta.version}:", version_GempubProperty, out);
198 appendProperty_Gempub_(d, "Revision date:", revisionDate_GempubProperty, out); 197 appendProperty_Gempub_(d, "${gempub.meta.revdate}:", revisionDate_GempubProperty, out);
199 if (hasProperty_Gempub_(d, publishDate_GempubProperty)) { 198 if (hasProperty_Gempub_(d, publishDate_GempubProperty)) {
200 appendProperty_Gempub_(d, "Publish date:", publishDate_GempubProperty, out); 199 appendProperty_Gempub_(d, "${gempub.meta.pubdate}:", publishDate_GempubProperty, out);
201 } 200 }
202 else { 201 else {
203 appendProperty_Gempub_(d, "Published:", published_GempubProperty, out); 202 appendProperty_Gempub_(d, "${gempub.meta.pub}:", published_GempubProperty, out);
204 } 203 }
205 appendProperty_Gempub_(d, "Language:", language_GempubProperty, out); 204 appendProperty_Gempub_(d, "${gempub.meta.lang}:", language_GempubProperty, out);
206 appendProperty_Gempub_(d, "License:", license_GempubProperty, out); 205 appendProperty_Gempub_(d, "${gempub.meta.license}:", license_GempubProperty, out);
207 appendProperty_Gempub_(d, "\u00a9", copyright_GempubProperty, out); 206 appendProperty_Gempub_(d, "\u00a9", copyright_GempubProperty, out);
207 translate_Lang(out);
208 return out; 208 return out;
209} 209}
210 210