Skip to content

Support setting i18n conditions for each content file

Phu Nguyen requested to merge work/generation into master
  • Each condition is the required translation percentage of another content file or of the string file:

    • It can be either a string or a dict of (string, float). In case of a string, the float is default to be 0.75.
      • The string is either "strings" for the string file, or the path to a content file.
      • The float is the threshold for qualifying the file's translation.
    • Each file then can define its own set of conditions. For example:
      i18n_configs:
        conditions:
        - strings
      # there is one condition: at least 75% of i18n/en.yaml is translated.
  • If at least one condition is not met, a 'warning: true' value will be added to the frontmatter, which then can be used to show a warning that the web page is considered insufficiently translated

Resolve #3 (closed)

Edited by Phu Nguyen

Merge request reports