From: Niki Roo Date: Thu, 22 Jun 2017 19:05:12 +0000 (+0200) Subject: Update to nnikiroo-utils-1.5.0 X-Git-Tag: fanfix-1.6.0~40 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=ce788468f22e7666d97acedb81a15004aaf0bc01;p=fanfix.git Update to nnikiroo-utils-1.5.0 --- diff --git a/libs/nikiroo-utils-1.4.3-sources.jar b/libs/nikiroo-utils-1.4.3-sources.jar deleted file mode 100644 index 559a58d..0000000 Binary files a/libs/nikiroo-utils-1.4.3-sources.jar and /dev/null differ diff --git a/libs/nikiroo-utils-1.5.0-sources.jar b/libs/nikiroo-utils-1.5.0-sources.jar new file mode 100644 index 0000000..13b8f98 Binary files /dev/null and b/libs/nikiroo-utils-1.5.0-sources.jar differ diff --git a/src/be/nikiroo/fanfix/bundles/Config.java b/src/be/nikiroo/fanfix/bundles/Config.java index 6a728c4..a38b9e2 100644 --- a/src/be/nikiroo/fanfix/bundles/Config.java +++ b/src/be/nikiroo/fanfix/bundles/Config.java @@ -1,53 +1,58 @@ package be.nikiroo.fanfix.bundles; import be.nikiroo.utils.resources.Meta; +import be.nikiroo.utils.resources.Meta.Format; /** * The configuration options. * * @author niki */ +@SuppressWarnings("javadoc") public enum Config { - @Meta(what = "language (example: en-GB, fr-BE...) or nothing for default system language", where = "", format = "Locale|''", info = "Force the language (can be overwritten again with the env variable $LANG)") + @Meta(description = "language (example: en-GB, fr-BE...) or nothing for default system language", format = Format.LOCALE, info = "Force the language (can be overwritten again with the env variable $LANG)") LANG, // - @Meta(what = "reader type (CLI = simple output to console, LOCAL = use local system file handler)", where = "", format = "'CLI'|'LOCAL'", info = "Select the default reader to use to read stories") + @Meta(description = "reader type (CLI = simple output to console, LOCAL = use local system file handler)", format = Format.FIXED_LIST, list = { + "CLI", "LOCAL" }, info = "Select the default reader to use to read stories") READER_TYPE, // - @Meta(what = "absolute path, $HOME variable supported, / is always accepted as dir separator", where = "", format = "Directory", info = "The directory where to store temporary files, defaults to directory 'tmp' in the conig directory (usually $HOME/.fanfix)") + @Meta(description = "absolute path, $HOME variable supported, / is always accepted as dir separator", format = Format.DIRECTORY, info = "The directory where to store temporary files, defaults to directory 'tmp' in the conig directory (usually $HOME/.fanfix)") CACHE_DIR, // - @Meta(what = "delay in hours, or 0 for no cache, or -1 for infinite time (default)", where = "", format = "int", info = "The delay after which a cached resource that is thought to change ~often is considered too old and triggers a refresh") + @Meta(description = "delay in hours, or 0 for no cache, or -1 for infinite time (default)", format = Format.INT, info = "The delay after which a cached resource that is thought to change ~often is considered too old and triggers a refresh") CACHE_MAX_TIME_CHANGING, // - @Meta(what = "delay in hours, or 0 for no cache, or -1 for infinite time (default)", where = "", format = "int", info = "The delay after which a cached resource that is thought to change rarely is considered too old and triggers a refresh") + @Meta(description = "delay in hours, or 0 for no cache, or -1 for infinite time (default)", format = Format.INT, info = "The delay after which a cached resource that is thought to change rarely is considered too old and triggers a refresh") CACHE_MAX_TIME_STABLE, // - @Meta(what = "string", where = "", format = "String", info = "The user-agent to use to download files") + @Meta(description = "string", info = "The user-agent to use to download files") USER_AGENT, // - @Meta(what = "absolute path, $HOME variable supported, / is always accepted as dir separator", where = "", format = "Directory", info = "The directory where to get the default story covers") + @Meta(description = "absolute path, $HOME variable supported, / is always accepted as dir separator", format = Format.DIRECTORY, info = "The directory where to get the default story covers") DEFAULT_COVERS_DIR, // - @Meta(what = "absolute path, $HOME variable supported, / is always accepted as dir separator", where = "", format = "Directory", info = "The directory where to store the library") + @Meta(description = "absolute path, $HOME variable supported, / is always accepted as dir separator", format = Format.DIRECTORY, info = "The directory where to store the library") LIBRARY_DIR, // - @Meta(what = "boolean", where = "", format = "'true'|'false'", info = "Show debug information on errors") + @Meta(description = "boolean", format = Format.BOOLEAN, info = "Show debug information on errors") DEBUG_ERR, // - @Meta(what = "image format", where = "", format = "'PNG'|JPG'|'BMP'", info = "Image format to use for cover images") + @Meta(description = "image format", format = Format.COMBO_LIST, list = { + "PNG", "JPG", "BMP" }, info = "Image format to use for cover images") IMAGE_FORMAT_COVER, // - @Meta(what = "image format", where = "", format = "'PNG'|JPG'|'BMP'", info = "Image format to use for content images") + @Meta(description = "image format", format = Format.COMBO_LIST, list = { + "PNG", "JPG", "BMP" }, info = "Image format to use for content images") IMAGE_FORMAT_CONTENT, // - // This key is only present to allow access to suffixes, so no Meta + @Meta(group = true) LATEX_LANG, // - @Meta(what = "LaTeX output language", where = "LaTeX", format = "String", info = "LaTeX full name for English") + @Meta(description = "LaTeX output language: English", info = "LaTeX full name") LATEX_LANG_EN, // - @Meta(what = "LaTeX output language", where = "LaTeX", format = "String", info = "LaTeX full name for French") + @Meta(description = "LaTeX output language: French", info = "LaTeX full name") LATEX_LANG_FR, // - @Meta(what = "other 'by' prefixes before author name", where = "", format = "comma-separated list|String", info = "used to identify the author") + @Meta(description = "other 'by' prefixes before author name, used to identify the author", array = true) BYS, // - @Meta(what = "Chapter identification languages", where = "", format = "comma-separated list|String", info = "used to identify a starting chapter in text mode") + @Meta(description = "List of languages codes used for chapter identification (should not be changed)", array = true, info = "EN,FR") CHAPTER, // - @Meta(what = "Chapter identification string", where = "String", format = "", info = "used to identify a starting chapter in text mode") + @Meta(description = "Chapter identification String: English", info = "used to identify a starting chapter in text mode") CHAPTER_EN, // - @Meta(what = "Chapter identification string", where = "String", format = "", info = "used to identify a starting chapter in text mode") + @Meta(description = "Chapter identification String: French", info = "used to identify a starting chapter in text mode") CHAPTER_FR, // - @Meta(what = "Login information", where = "", format = "String", info = "used to login on YiffStar to have access to all the stories (should not be necessary anymore)") + @Meta(description = "Login information (username) for YiffStar to have access to all the stories (should not be necessary anymore)") LOGIN_YIFFSTAR_USER, // - @Meta(what = "Login information", where = "", format = "Password", info = "used to login on YiffStar to have access to all the stories (should not be necessary anymore)") + @Meta(description = "Login information (password) for YiffStar to have access to all the stories (should not be necessary anymore)", format = Format.PASSWORD) LOGIN_YIFFSTAR_PASS, // - @Meta(what = "Minimum time between version update checks in days, or -1 for 'no checks' -- default is 1 day", where = "VersionCheck", format = "int", info = "If the last update check was done at least that many days, check for updates at startup") + @Meta(description = "If the last update check was done at least that many days, check for updates at startup (-1 for 'no checks' -- default is 1 day)", format = Format.INT) UPDATE_INTERVAL, } diff --git a/src/be/nikiroo/fanfix/bundles/ConfigBundle.java b/src/be/nikiroo/fanfix/bundles/ConfigBundle.java index 7d38e36..cfe064e 100644 --- a/src/be/nikiroo/fanfix/bundles/ConfigBundle.java +++ b/src/be/nikiroo/fanfix/bundles/ConfigBundle.java @@ -15,7 +15,7 @@ public class ConfigBundle extends Bundle { * Create a new {@link ConfigBundle}. */ public ConfigBundle() { - super(Config.class, Target.config); + super(Config.class, Target.config, null); } /** diff --git a/src/be/nikiroo/fanfix/bundles/StringId.java b/src/be/nikiroo/fanfix/bundles/StringId.java index 78b271d..c49627f 100644 --- a/src/be/nikiroo/fanfix/bundles/StringId.java +++ b/src/be/nikiroo/fanfix/bundles/StringId.java @@ -15,6 +15,7 @@ import be.nikiroo.utils.resources.Meta; * * @author niki */ +@SuppressWarnings("javadoc") public enum StringId { /** * A special key used for technical reasons only, without annotations so it @@ -30,91 +31,91 @@ public enum StringId { * Use it when you need a real translation but still don't have a key. */ DUMMY, // - @Meta(what = "help message", where = "cli", format = "%s = supported input, %s = supported output", info = "help message for the syntax") + @Meta(info = "%s = supported input, %s = supported output", description = "help message for the syntax") HELP_SYNTAX, // - @Meta(what = "error message", where = "cli", format = "", info = "syntax error message") + @Meta(description = "syntax error message") ERR_SYNTAX, // - @Meta(what = "error message", where = "cli", format = "%s = support name, %s = support desc", info = "an input or output support type description") + @Meta(info = "%s = support name, %s = support desc", description = "an input or output support type description") ERR_SYNTAX_TYPE, // - @Meta(what = "error message", where = "cli", format = "%s = input string", info = "Error when retrieving data") + @Meta(info = "%s = input string", description = "Error when retrieving data") ERR_LOADING, // - @Meta(what = "error message", where = "cli", format = "%s = save target", info = "Error when saving to given target") + @Meta(info = "%s = save target", description = "Error when saving to given target") ERR_SAVING, // - @Meta(what = "error message", where = "cli", format = "%s = bad output format", info = "Error when unknown output format") + @Meta(info = "%s = bad output format", description = "Error when unknown output format") ERR_BAD_OUTPUT_TYPE, // - @Meta(what = "error message", where = "cli", format = "%s = input string", info = "Error when converting input to URL/File") + @Meta(info = "%s = input string", description = "Error when converting input to URL/File") ERR_BAD_URL, // - @Meta(what = "error message", where = "cli", format = "%s = input url", info = "URL/File not supported") + @Meta(info = "%s = input url", description = "URL/File not supported") ERR_NOT_SUPPORTED, // - @Meta(what = "error message", where = "BasicSupport", format = "%s = cover URL", info = "Failed to download cover : %s") + @Meta(info = "%s = cover URL", description = "Failed to download cover : %s") ERR_BS_NO_COVER, // - @Meta(what = "char", where = "LaTeX/BasicSupport", format = "single char", info = "Canonical OPEN SINGLE QUOTE char (for instance: `)") + @Meta(info = "single char", description = "Canonical OPEN SINGLE QUOTE char (for instance: `)") OPEN_SINGLE_QUOTE, // - @Meta(what = "char", where = "LaTeX/BasicSupport", format = "single char", info = "Canonical CLOSE SINGLE QUOTE char (for instance: ‘)") + @Meta(info = "single char", description = "Canonical CLOSE SINGLE QUOTE char (for instance: ‘)") CLOSE_SINGLE_QUOTE, // - @Meta(what = "char", where = "LaTeX/BasicSupport", format = "single char", info = "Canonical OPEN DOUBLE QUOTE char (for instance: “)") + @Meta(info = "single char", description = "Canonical OPEN DOUBLE QUOTE char (for instance: “)") OPEN_DOUBLE_QUOTE, // - @Meta(what = "char", where = "LaTeX/BasicSupport", format = "single char", info = "Canonical CLOSE DOUBLE QUOTE char (for instance: ”)") + @Meta(info = "single char", description = "Canonical CLOSE DOUBLE QUOTE char (for instance: ”)") CLOSE_DOUBLE_QUOTE, // - @Meta(what = "chapter name", where = "BasicSupport", format = "", info = "Name of the description fake chapter") + @Meta(description = "Name of the description fake chapter") DESCRIPTION, // - @Meta(what = "chapter name", where = "", format = "%d = number, %s = name", info = "Name of a chapter with a name") + @Meta(info = "%d = number, %s = name", description = "Name of a chapter with a name") CHAPTER_NAMED, // - @Meta(what = "chapter name", where = "", format = "%d = number, %s = name", info = "Name of a chapter without name") + @Meta(info = "%d = number, %s = name", description = "Name of a chapter without name") CHAPTER_UNNAMED, // - @Meta(what = "input format description", where = "SupportType", format = "%s = type", info = "Default description when the type is not known by i18n") + @Meta(info = "%s = type", description = "Default description when the type is not known by i18n") INPUT_DESC, // - @Meta(what = "input format description", where = "SupportType", format = "", info = "Description of this input type") + @Meta(description = "Description of this input type") INPUT_DESC_EPUB, // - @Meta(what = "input format description", where = "SupportType", format = "", info = "Description of this input type") + @Meta(description = "Description of this input type") INPUT_DESC_TEXT, // - @Meta(what = "input format description", where = "SupportType", format = "", info = "Description of this input type") + @Meta(description = "Description of this input type") INPUT_DESC_INFO_TEXT, // - @Meta(what = "input format description", where = "SupportType", format = "", info = "Description of this input type") + @Meta(description = "Description of this input type") INPUT_DESC_FANFICTION, // - @Meta(what = "input format description", where = "SupportType", format = "", info = "Description of this input type") + @Meta(description = "Description of this input type") INPUT_DESC_FIMFICTION, // - @Meta(what = "input format description", where = "SupportType", format = "", info = "Description of this input type") + @Meta(description = "Description of this input type") INPUT_DESC_MANGAFOX, // - @Meta(what = "input format description", where = "SupportType", format = "", info = "Description of this input type") + @Meta(description = "Description of this input type") INPUT_DESC_E621, // - @Meta(what = "input format description", where = "SupportType", format = "", info = "Description of this input type") + @Meta(description = "Description of this input type") INPUT_DESC_E_HENTAI, // - @Meta(what = "output format description", where = "OutputType", format = "%s = type", info = "Default description when the type is not known by i18n") + @Meta(info = "%s = type", description = "Default description when the type is not known by i18n") OUTPUT_DESC, // - @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Description of this output type") OUTPUT_DESC_EPUB, // - @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Description of this output type") OUTPUT_DESC_TEXT, // - @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Description of this output type") OUTPUT_DESC_INFO_TEXT, // - @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Description of this output type") OUTPUT_DESC_CBZ, // - @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Description of this output type") OUTPUT_DESC_HTML, // - @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Description of this output type") OUTPUT_DESC_LATEX, // - @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Description of this output type") OUTPUT_DESC_SYSOUT, // - @Meta(what = "short output format description", where = "OutputType", format = "%s = type", info = "Default description when the type is not known by i18n") + @Meta(group = true, info = "%s = type", description = "Default description when the type is not known by i18n") OUTPUT_DESC_SHORT, // - @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Short description of this output type") OUTPUT_DESC_SHORT_EPUB, // - @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Short description of this output type") OUTPUT_DESC_SHORT_TEXT, // - @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Short description of this output type") OUTPUT_DESC_SHORT_INFO_TEXT, // - @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Short description of this output type") OUTPUT_DESC_SHORT_CBZ, // - @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Short description of this output type") OUTPUT_DESC_SHORT_LATEX, // - @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Short description of this output type") OUTPUT_DESC_SHORT_SYSOUT, // - @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type") + @Meta(description = "Short description of this output type") OUTPUT_DESC_SHORT_HTML, // - @Meta(what = "error message", where = "LaTeX", format = "%s = the unknown 2-code language", info = "Error message for unknown 2-letter LaTeX language code") + @Meta(info = "%s = the unknown 2-code language", description = "Error message for unknown 2-letter LaTeX language code") LATEX_LANG_UNKNOWN, // - @Meta(what = "'by' prefix before author name", where = "", format = "", info = "used to output the author, make sure it is covered by Config.BYS for input detection") + @Meta(description = "'by' prefix before author name used to output the author, make sure it is covered by Config.BYS for input detection") BY, // ; diff --git a/src/be/nikiroo/fanfix/bundles/Target.java b/src/be/nikiroo/fanfix/bundles/Target.java index 3318e9e..8b5e867 100644 --- a/src/be/nikiroo/fanfix/bundles/Target.java +++ b/src/be/nikiroo/fanfix/bundles/Target.java @@ -18,4 +18,6 @@ public enum Target { resources, /** UI resources (from colours to behaviour) */ ui, + /** Description of UI resources. */ + ui_description, } diff --git a/src/be/nikiroo/fanfix/bundles/UiConfig.java b/src/be/nikiroo/fanfix/bundles/UiConfig.java index d211947..e83a460 100644 --- a/src/be/nikiroo/fanfix/bundles/UiConfig.java +++ b/src/be/nikiroo/fanfix/bundles/UiConfig.java @@ -1,23 +1,25 @@ package be.nikiroo.fanfix.bundles; import be.nikiroo.utils.resources.Meta; +import be.nikiroo.utils.resources.Meta.Format; /** * The configuration options. * * @author niki */ +@SuppressWarnings("javadoc") public enum UiConfig { - @Meta(what = "directory", where = "", format = "absolute path, $HOME variable supported, / is always accepted as dir separator", info = "The directory where to store temporary files, defaults to directory 'tmp.reader' in the conig directory (usually $HOME/.fanfix)") + @Meta(format = Format.DIRECTORY, info = "absolute path, $HOME variable supported, / is always accepted as dir separator", description = "The directory where to store temporary files, defaults to directory 'tmp.reader' in the conig directory (usually $HOME/.fanfix)") CACHE_DIR_LOCAL_READER, // - @Meta(what = "Output type", where = "Local Reader", format = "One of the known output type", info = "The type of output for the Local Reader for non-images documents") + @Meta(format = Format.COMBO_LIST, list = { "HTML", "CBZ" }, info = "One of the known output type", description = "The type of output for the Local Reader for non-images documents") NON_IMAGES_DOCUMENT_TYPE, // - @Meta(what = "Output type", where = "Local Reader", format = "One of the known output type", info = "The type of output for the Local Reader for images documents") + @Meta(format = Format.COMBO_LIST, list = { "HTML", "CBZ" }, description = "The type of output for the Local Reader for images documents") IMAGES_DOCUMENT_TYPE, // - @Meta(what = "Program", where = "Local Reader", format = "A command to start", info = "The command launched for images documents -- default to the system default for the current file type") + @Meta(info = "A command to start", description = "The command launched for images documents -- default to the system default for the current file type") IMAGES_DOCUMENT_READER, // - @Meta(what = "Program", where = "Local Reader", format = "A command to start", info = "The command launched for non images documents -- default to the system default for the current file type") + @Meta(info = "A command to start", description = "The command launched for non images documents -- default to the system default for the current file type") NON_IMAGES_DOCUMENT_READER, // - @Meta(what = "A background colour", where = "Local Reader Frame", format = "#rrggbb", info = "The background colour if you don't want the default system one") + @Meta(format = Format.COLOR, description = "The background colour if you don't want the default system one") BACKGROUND_COLOR, // } diff --git a/src/be/nikiroo/fanfix/bundles/UiConfigBundle.java b/src/be/nikiroo/fanfix/bundles/UiConfigBundle.java index 2c31d09..8b2c008 100644 --- a/src/be/nikiroo/fanfix/bundles/UiConfigBundle.java +++ b/src/be/nikiroo/fanfix/bundles/UiConfigBundle.java @@ -13,7 +13,7 @@ import be.nikiroo.utils.resources.Bundle; */ public class UiConfigBundle extends Bundle { public UiConfigBundle() { - super(UiConfig.class, Target.ui); + super(UiConfig.class, Target.ui, new UiConfigBundleDesc()); } /** diff --git a/src/be/nikiroo/fanfix/bundles/UiConfigBundleDesc.java b/src/be/nikiroo/fanfix/bundles/UiConfigBundleDesc.java new file mode 100644 index 0000000..da42950 --- /dev/null +++ b/src/be/nikiroo/fanfix/bundles/UiConfigBundleDesc.java @@ -0,0 +1,39 @@ +package be.nikiroo.fanfix.bundles; + +import java.io.File; +import java.io.IOException; + +import be.nikiroo.utils.resources.TransBundle; + +/** + * This class manages the configuration of UI of the application (colours and + * behaviour) + * + * @author niki + */ +public class UiConfigBundleDesc extends TransBundle { + public UiConfigBundleDesc() { + super(UiConfig.class, Target.ui_description); + } + + /** + * Update resource file. + * + * @param args + * not used + * + * @throws IOException + * in case of I/O error + */ + public static void main(String[] args) throws IOException { + String path = new File(".").getAbsolutePath() + + "/src/be/nikiroo/fanfix/bundles/"; + new UiConfigBundleDesc().updateFile(path); + System.out.println("Path updated: " + path); + } + + @Override + protected String getBundleDisplayName() { + return "UI configuration options description"; + } +} diff --git a/src/be/nikiroo/fanfix/bundles/config.properties b/src/be/nikiroo/fanfix/bundles/config.properties index 2fa3d32..6151843 100644 --- a/src/be/nikiroo/fanfix/bundles/config.properties +++ b/src/be/nikiroo/fanfix/bundles/config.properties @@ -2,63 +2,66 @@ # -# (WHAT: language (example: en-GB, fr-BE...) or nothing for default system language, FORMAT: Locale|'') -# Force the language (can be overwritten again with the env variable $LANG) +# language (example: en-GB, fr-BE...) or nothing for default system language +# (FORMAT: LOCALE) Force the language (can be overwritten again with the env variable $LANG) LANG = -# (WHAT: reader type (CLI = simple output to console, LOCAL = use local system file handler), FORMAT: 'CLI'|'LOCAL') -# Select the default reader to use to read stories +# reader type (CLI = simple output to console, LOCAL = use local system file handler) +# (FORMAT: FIXED_LIST) Select the default reader to use to read stories +# ALLOWED VALUES: "CLI" "LOCAL" READER_TYPE = -# (WHAT: absolute path, $HOME variable supported, / is always accepted as dir separator, FORMAT: Directory) -# The directory where to store temporary files, defaults to directory 'tmp' in the conig directory (usually $HOME/.fanfix) +# absolute path, $HOME variable supported, / is always accepted as dir separator +# (FORMAT: DIRECTORY) The directory where to store temporary files, defaults to directory 'tmp' in the conig directory (usually $HOME/.fanfix) CACHE_DIR = -# (WHAT: delay in hours, or 0 for no cache, or -1 for infinite time (default), FORMAT: int) -# The delay after which a cached resource that is thought to change ~often is considered too old and triggers a refresh +# delay in hours, or 0 for no cache, or -1 for infinite time (default) +# (FORMAT: INT) The delay after which a cached resource that is thought to change ~often is considered too old and triggers a refresh CACHE_MAX_TIME_CHANGING = 24 -# (WHAT: delay in hours, or 0 for no cache, or -1 for infinite time (default), FORMAT: int) -# The delay after which a cached resource that is thought to change rarely is considered too old and triggers a refresh +# delay in hours, or 0 for no cache, or -1 for infinite time (default) +# (FORMAT: INT) The delay after which a cached resource that is thought to change rarely is considered too old and triggers a refresh CACHE_MAX_TIME_STABLE = -# (WHAT: string, FORMAT: String) -# The user-agent to use to download files +# string (FORMAT: STRING) The user-agent to use to download files USER_AGENT = Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 -- ELinks/0.9.3 (Linux 2.6.11 i686; 80x24) -# (WHAT: absolute path, $HOME variable supported, / is always accepted as dir separator, FORMAT: Directory) -# The directory where to get the default story covers +# absolute path, $HOME variable supported, / is always accepted as dir separator +# (FORMAT: DIRECTORY) The directory where to get the default story covers DEFAULT_COVERS_DIR = $HOME/bin/epub/ -# (WHAT: absolute path, $HOME variable supported, / is always accepted as dir separator, FORMAT: Directory) -# The directory where to store the library +# absolute path, $HOME variable supported, / is always accepted as dir separator +# (FORMAT: DIRECTORY) The directory where to store the library LIBRARY_DIR = $HOME/Books -# (WHAT: boolean, FORMAT: 'true'|'false') -# Show debug information on errors +# boolean (FORMAT: BOOLEAN) Show debug information on errors DEBUG_ERR = false -# (WHAT: image format, FORMAT: 'PNG'|JPG'|'BMP') -# Image format to use for cover images +# image format (FORMAT: COMBO_LIST) Image format to use for cover images +# ALLOWED VALUES: "PNG" "JPG" "BMP" IMAGE_FORMAT_COVER = png -# (WHAT: image format, FORMAT: 'PNG'|JPG'|'BMP') -# Image format to use for content images +# image format (FORMAT: COMBO_LIST) Image format to use for content images +# ALLOWED VALUES: "PNG" "JPG" "BMP" IMAGE_FORMAT_CONTENT = png -# (WHAT: LaTeX output language, WHERE: LaTeX, FORMAT: String) -# LaTeX full name for English +# This item is used as a group, its content is not expected to be used. +LATEX_LANG = +# LaTeX output language: English +# (FORMAT: STRING) LaTeX full name LATEX_LANG_EN = english -# (WHAT: LaTeX output language, WHERE: LaTeX, FORMAT: String) -# LaTeX full name for French +# LaTeX output language: French +# (FORMAT: STRING) LaTeX full name LATEX_LANG_FR = french -# (WHAT: other 'by' prefixes before author name, FORMAT: comma-separated list|String) -# used to identify the author +# other 'by' prefixes before author name, used to identify the author +# (FORMAT: STRING) +# (This item accept a list of comma-separated values) BYS = by,par,de,©,(c) -# (WHAT: Chapter identification languages, FORMAT: comma-separated list|String) -# used to identify a starting chapter in text mode +# List of languages codes used for chapter identification (should not be changed) +# (FORMAT: STRING) EN,FR +# (This item accept a list of comma-separated values) CHAPTER = EN,FR -# (WHAT: Chapter identification string, WHERE: String) -# used to identify a starting chapter in text mode +# Chapter identification String: English +# (FORMAT: STRING) used to identify a starting chapter in text mode CHAPTER_EN = Chapter -# (WHAT: Chapter identification string, WHERE: String) -# used to identify a starting chapter in text mode +# Chapter identification String: French +# (FORMAT: STRING) used to identify a starting chapter in text mode CHAPTER_FR = Chapitre -# (WHAT: Login information, FORMAT: String) -# used to login on YiffStar to have access to all the stories (should not be necessary anymore) +# Login information (username) for YiffStar to have access to all the stories (should not be necessary anymore) +# (FORMAT: STRING) LOGIN_YIFFSTAR_USER = -# (WHAT: Login information, FORMAT: Password) -# used to login on YiffStar to have access to all the stories (should not be necessary anymore) +# Login information (password) for YiffStar to have access to all the stories (should not be necessary anymore) +# (FORMAT: PASSWORD) LOGIN_YIFFSTAR_PASS = -# (WHAT: Minimum time between version update checks in days, or -1 for 'no checks' -- default is 1 day, WHERE: VersionCheck, FORMAT: int) -# If the last update check was done at least that many days, check for updates at startup +# If the last update check was done at least that many days, check for updates at startup (-1 for 'no checks' -- default is 1 day) +# (FORMAT: INT) UPDATE_INTERVAL = diff --git a/src/be/nikiroo/fanfix/bundles/resources.properties b/src/be/nikiroo/fanfix/bundles/resources.properties index c5c3137..f664eb4 100644 --- a/src/be/nikiroo/fanfix/bundles/resources.properties +++ b/src/be/nikiroo/fanfix/bundles/resources.properties @@ -7,8 +7,8 @@ # -# (WHAT: help message, WHERE: cli, FORMAT: %s = supported input, %s = supported output) # help message for the syntax +# (FORMAT: STRING) %s = supported input, %s = supported output HELP_SYNTAX = Valid options:\n\ \t--import [URL]: import into library\n\ \t--export [id] [output_type] [target]: export story to target\n\ @@ -25,139 +25,138 @@ Supported input types:\n\ \n\ Supported output types:\n\ %s -# (WHAT: error message, WHERE: cli) -# syntax error message +# syntax error message (FORMAT: STRING) ERR_SYNTAX = Syntax error (try "--help") -# (WHAT: error message, WHERE: cli, FORMAT: %s = support name, %s = support desc) # an input or output support type description +# (FORMAT: STRING) %s = support name, %s = support desc ERR_SYNTAX_TYPE = %s: %s -# (WHAT: error message, WHERE: cli, FORMAT: %s = input string) # Error when retrieving data +# (FORMAT: STRING) %s = input string ERR_LOADING = Error when retrieving data from: %s -# (WHAT: error message, WHERE: cli, FORMAT: %s = save target) # Error when saving to given target +# (FORMAT: STRING) %s = save target ERR_SAVING = Error when saving to target: %s -# (WHAT: error message, WHERE: cli, FORMAT: %s = bad output format) # Error when unknown output format +# (FORMAT: STRING) %s = bad output format ERR_BAD_OUTPUT_TYPE = Unknown output type: %s -# (WHAT: error message, WHERE: cli, FORMAT: %s = input string) # Error when converting input to URL/File +# (FORMAT: STRING) %s = input string ERR_BAD_URL = Cannot understand file or protocol: %s -# (WHAT: error message, WHERE: cli, FORMAT: %s = input url) # URL/File not supported +# (FORMAT: STRING) %s = input url ERR_NOT_SUPPORTED = URL not supported: %s -# (WHAT: error message, WHERE: BasicSupport, FORMAT: %s = cover URL) # Failed to download cover : %s +# (FORMAT: STRING) %s = cover URL ERR_BS_NO_COVER = Failed to download cover: %s -# (WHAT: char, WHERE: LaTeX/BasicSupport, FORMAT: single char) # Canonical OPEN SINGLE QUOTE char (for instance: `) +# (FORMAT: STRING) single char OPEN_SINGLE_QUOTE = ` -# (WHAT: char, WHERE: LaTeX/BasicSupport, FORMAT: single char) # Canonical CLOSE SINGLE QUOTE char (for instance: ‘) +# (FORMAT: STRING) single char CLOSE_SINGLE_QUOTE = ‘ -# (WHAT: char, WHERE: LaTeX/BasicSupport, FORMAT: single char) # Canonical OPEN DOUBLE QUOTE char (for instance: “) +# (FORMAT: STRING) single char OPEN_DOUBLE_QUOTE = “ -# (WHAT: char, WHERE: LaTeX/BasicSupport, FORMAT: single char) # Canonical CLOSE DOUBLE QUOTE char (for instance: ”) +# (FORMAT: STRING) single char CLOSE_DOUBLE_QUOTE = ” -# (WHAT: chapter name, WHERE: BasicSupport) # Name of the description fake chapter +# (FORMAT: STRING) DESCRIPTION = Description -# (WHAT: chapter name, FORMAT: %d = number, %s = name) # Name of a chapter with a name +# (FORMAT: STRING) %d = number, %s = name CHAPTER_NAMED = Chapter %d: %s -# (WHAT: chapter name, FORMAT: %d = number, %s = name) # Name of a chapter without name +# (FORMAT: STRING) %d = number, %s = name CHAPTER_UNNAMED = Chapter %d -# (WHAT: input format description, WHERE: SupportType, FORMAT: %s = type) # Default description when the type is not known by i18n +# (FORMAT: STRING) %s = type INPUT_DESC = Unknown type: %s -# (WHAT: input format description, WHERE: SupportType) # Description of this input type +# (FORMAT: STRING) INPUT_DESC_EPUB = EPUB files created by this program (we do not support "all" EPUB files) -# (WHAT: input format description, WHERE: SupportType) # Description of this input type +# (FORMAT: STRING) INPUT_DESC_TEXT = Support class for local stories encoded in textual format, with a few rules :\n\ \tthe title must be on the first line, \n\ \tthe author (preceded by nothing, "by " or "©") must be on the second line, possibly with the publication date in parenthesis (i.e., "By Unknown (3rd October 1998)"), \n\ \tchapters must be declared with "Chapter x" or "Chapter x: NAME OF THE CHAPTER", where "x" is the chapter number,\n\ \ta description of the story must be given as chapter number 0,\n\ \ta cover image may be present with the same filename but a PNG, JPEG or JPG extension. -# (WHAT: input format description, WHERE: SupportType) # Description of this input type +# (FORMAT: STRING) INPUT_DESC_INFO_TEXT = Contains the same information as the TEXT format, but with a companion ".info" file to store some metadata -# (WHAT: input format description, WHERE: SupportType) # Description of this input type +# (FORMAT: STRING) INPUT_DESC_FANFICTION = Fan fictions of many, many different universes, from TV shows to novels to games. -# (WHAT: input format description, WHERE: SupportType) # Description of this input type +# (FORMAT: STRING) INPUT_DESC_FIMFICTION = Fanfictions devoted to the My Little Pony show -# (WHAT: input format description, WHERE: SupportType) # Description of this input type +# (FORMAT: STRING) INPUT_DESC_MANGAFOX = A well filled repository of mangas, or, as their website states: Most popular manga scanlations read online for free at mangafox, as well as a close-knit community to chat and make friends. -# (WHAT: input format description, WHERE: SupportType) # Description of this input type +# (FORMAT: STRING) INPUT_DESC_E621 = Furry website supporting comics, including MLP -# (WHAT: input format description, WHERE: SupportType) # Description of this input type +# (FORMAT: STRING) INPUT_DESC_E_HENTAI = Website offering many comics/manga, mostly but not always NSFW (hence 'Hentai'); MLP comics can be found there, too -# (WHAT: output format description, WHERE: OutputType, FORMAT: %s = type) # Default description when the type is not known by i18n +# (FORMAT: STRING) %s = type OUTPUT_DESC = Unknown type: %s -# (WHAT: output format description, WHERE: OutputType) # Description of this output type +# (FORMAT: STRING) OUTPUT_DESC_EPUB = Standard EPUB file working on most e-book readers and viewers -# (WHAT: output format description, WHERE: OutputType) # Description of this output type +# (FORMAT: STRING) OUTPUT_DESC_TEXT = Local stories encoded in textual format, with a few rules :\n\ \tthe title must be on the first line, \n\ \tthe author (preceded by nothing, "by " or "©") must be on the second line, possibly with the publication date in parenthesis (i.e., "By Unknown (3rd October 1998)"), \n\ \tchapters must be declared with "Chapter x" or "Chapter x: NAME OF THE CHAPTER", where "x" is the chapter number,\n\ \ta description of the story must be given as chapter number 0,\n\ \ta cover image may be present with the same filename but a PNG, JPEG or JPG extension. -# (WHAT: output format description, WHERE: OutputType) # Description of this output type +# (FORMAT: STRING) OUTPUT_DESC_INFO_TEXT = Contains the same information as the TEXT format, but with a companion ".info" file to store some metadata -# (WHAT: output format description, WHERE: OutputType) # Description of this output type +# (FORMAT: STRING) OUTPUT_DESC_CBZ = CBZ file (basically a ZIP file containing images -- we store the images in PNG format) -# (WHAT: output format description, WHERE: OutputType) # Description of this output type +# (FORMAT: STRING) OUTPUT_DESC_HTML = HTML files (a directory containing the resources and "index.html") -# (WHAT: output format description, WHERE: OutputType) # Description of this output type +# (FORMAT: STRING) OUTPUT_DESC_LATEX = A LaTeX file using the "book" template -# (WHAT: short output format description, WHERE: OutputType) # Description of this output type +# (FORMAT: STRING) OUTPUT_DESC_SYSOUT = A simple DEBUG console output -# (WHAT: short output format description, WHERE: OutputType, FORMAT: %s = type) # Default description when the type is not known by i18n +#This item is used as a group, its content is not expected to be used. OUTPUT_DESC_SHORT = %s -# (WHAT: short output format description, WHERE: OutputType) -# Description of this output type +# Short description of this output type +# (FORMAT: STRING) OUTPUT_DESC_SHORT_EPUB = Electronic book (.epub) -# (WHAT: short output format description, WHERE: OutputType) -# Description of this output type +# Short description of this output type +# (FORMAT: STRING) OUTPUT_DESC_SHORT_TEXT = Plain text (.txt) -# (WHAT: short output format description, WHERE: OutputType) -# Description of this output type +# Short description of this output type +# (FORMAT: STRING) OUTPUT_DESC_SHORT_INFO_TEXT = Plain text and metadata -# (WHAT: short output format description, WHERE: OutputType) -# Description of this output type +# Short description of this output type +# (FORMAT: STRING) OUTPUT_DESC_SHORT_CBZ = Comic book (.cbz) -# (WHAT: short output format description, WHERE: OutputType) -# Description of this output type +# Short description of this output type +# (FORMAT: STRING) OUTPUT_DESC_SHORT_LATEX = LaTeX (.tex) -# (WHAT: short output format description, WHERE: OutputType) -# Description of this output type +# Short description of this output type +# (FORMAT: STRING) OUTPUT_DESC_SHORT_SYSOUT = Console output -# (WHAT: short output format description, WHERE: OutputType) -# Description of this output type +# Short description of this output type +# (FORMAT: STRING) OUTPUT_DESC_SHORT_HTML = HTML files with resources (directory, .html) -# (WHAT: error message, WHERE: LaTeX, FORMAT: %s = the unknown 2-code language) # Error message for unknown 2-letter LaTeX language code +# (FORMAT: STRING) %s = the unknown 2-code language LATEX_LANG_UNKNOWN = Unknown language: %s -# (WHAT: 'by' prefix before author name) -# used to output the author, make sure it is covered by Config.BYS for input detection +# 'by' prefix before author name used to output the author, make sure it is covered by Config.BYS for input detection +# (FORMAT: STRING) BY = by diff --git a/src/be/nikiroo/fanfix/bundles/ui.properties b/src/be/nikiroo/fanfix/bundles/ui.properties index 8c7428d..5f251c5 100644 --- a/src/be/nikiroo/fanfix/bundles/ui.properties +++ b/src/be/nikiroo/fanfix/bundles/ui.properties @@ -2,21 +2,23 @@ # -# (WHAT: directory, FORMAT: absolute path, $HOME variable supported, / is always accepted as dir separator) # The directory where to store temporary files, defaults to directory 'tmp.reader' in the conig directory (usually $HOME/.fanfix) +# (FORMAT: DIRECTORY) absolute path, $HOME variable supported, / is always accepted as dir separator CACHE_DIR_LOCAL_READER = -# (WHAT: Output type, WHERE: Local Reader, FORMAT: One of the known output type) # The type of output for the Local Reader for non-images documents +# (FORMAT: COMBO_LIST) One of the known output type +# ALLOWED VALUES: "HTML" "CBZ" NON_IMAGES_DOCUMENT_TYPE = HTML -# (WHAT: Output type, WHERE: Local Reader, FORMAT: One of the known output type) # The type of output for the Local Reader for images documents +# (FORMAT: COMBO_LIST) +# ALLOWED VALUES: "HTML" "CBZ" IMAGES_DOCUMENT_TYPE = CBZ -# (WHAT: Program, WHERE: Local Reader, FORMAT: A command to start) # The command launched for images documents -- default to the system default for the current file type +# (FORMAT: STRING) A command to start IMAGES_DOCUMENT_READER = -# (WHAT: Program, WHERE: Local Reader, FORMAT: A command to start) # The command launched for non images documents -- default to the system default for the current file type +# (FORMAT: STRING) A command to start NON_IMAGES_DOCUMENT_READER = -# (WHAT: A background colour, WHERE: Local Reader Frame, FORMAT: #rrggbb) # The background colour if you don't want the default system one +# (FORMAT: COLOR) BACKGROUND_COLOR = #FFFFFF diff --git a/src/be/nikiroo/fanfix/bundles/ui_description.properties b/src/be/nikiroo/fanfix/bundles/ui_description.properties new file mode 100644 index 0000000..4b0792a --- /dev/null +++ b/src/be/nikiroo/fanfix/bundles/ui_description.properties @@ -0,0 +1,29 @@ +# United Kingdom (en_GB) UI configuration options description translation file (UTF-8) +# +# Note that any key can be doubled with a _NOUTF suffix +# to use when the NOUTF env variable is set to 1 +# +# Also, the comments always refer to the key below them. +# + + +# The directory where to store temporary files, defaults to directory 'tmp.reader' in the conig directory (usually $HOME/.fanfix) +# (FORMAT: DIRECTORY) absolute path, $HOME variable supported, / is always accepted as dir separator +CACHE_DIR_LOCAL_READER = The directory where to store temporary files, defaults to directory 'tmp.reader' in the config directory (usually $HOME/.fanfix) -- this is an absolute path, $HOME variable supported, / is always accepted as dir separator +# The type of output for the Local Reader for non-images documents +# (FORMAT: COMBO_LIST) One of the known output type +# ALLOWED VALUES: "HTML" "CBZ" +NON_IMAGES_DOCUMENT_TYPE = +# The type of output for the Local Reader for images documents +# (FORMAT: COMBO_LIST) +# ALLOWED VALUES: "HTML" "CBZ" +IMAGES_DOCUMENT_TYPE = +# The command launched for images documents -- default to the system default for the current file type +# (FORMAT: STRING) A command to start +IMAGES_DOCUMENT_READER = +# The command launched for non images documents -- default to the system default for the current file type +# (FORMAT: STRING) A command to start +NON_IMAGES_DOCUMENT_READER = +# The background colour if you don't want the default system one +# (FORMAT: COLOR) +BACKGROUND_COLOR =