Skip to content

Commit

Permalink
Merge pull request #1841 from openzim/add-custom-language-option
Browse files Browse the repository at this point in the history
Introduce option --customZimLanguage
  • Loading branch information
kelson42 committed May 20, 2023
2 parents 9deef97 + fda58ba commit 25b6024
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Dump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface DumpOpts {
publisher: string
withoutZimFullTextIndex: boolean
customZimTags?: string
customZimLanguage?: string
customZimTitle?: string
customZimDescription?: string
customZimLongDescription?: string
Expand Down
4 changes: 3 additions & 1 deletion src/mwoffliner.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ async function execute(argv: any) {
customZimDescription,
customZimLongDescription,
customZimTags,
customZimLanguage,
withoutZimFullTextIndex,
webp,
format,
Expand Down Expand Up @@ -185,7 +186,7 @@ async function execute(argv: any) {
const metaDataRequiredKeys = {
Creator: mwMetaData.creator,
Description: customZimDescription || mwMetaData.subTitle,
Language: mwMetaData.langIso3,
Language: customZimLanguage || mwMetaData.langIso3,
Publisher: publisher,
Title: customZimTitle || mwMetaData.title,
'Illustration_48x48@1': await getIllustrationMetadata(),
Expand Down Expand Up @@ -320,6 +321,7 @@ async function execute(argv: any) {
customZimLongDescription,
customZimTags,
customZimTitle,
customZimLanguage,
withoutZimFullTextIndex,
resume,
minifyHtml,
Expand Down
1 change: 1 addition & 0 deletions src/parameterList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const parameterDescriptions = {
customZimDescription: 'Allow to configure a custom ZIM file description. Max length is 80 chars.',
customZimLongDescription: 'Allow to configure a custom ZIM file long description. Max length is 4000 chars.',
customZimTags: 'Allow to configure custom ZIM file tags (semi-colon separated).',
customZimLanguage: 'Allow to configure a custom ISO639-3 content language code.',
customMainPage: 'Allow to configure a custom page as welcome page.',
filenamePrefix: 'For the part of the ZIM filename which is before the format & date parts.',
format:
Expand Down

0 comments on commit 25b6024

Please sign in to comment.