summaryrefslogtreecommitdiff
path: root/make/po4a.mk
blob: 9a093203ef0f17ab4676f26e532e5bbe7f56f1a4 (plain)
  1. # override with e.g. htmltemplate when handling non-Markdown files
  2. fileformat text
  3. # Percentage of l10n completed to be acceptable
  4. threshold 100
  5. # l10nfiles: relative paths to localizable files
  6. # Invoke from inside basedir of master files
  7. # potfile: path to POT file
  8. mkpot:
  9.     po4a-gettextize -M UTF-8 -L UTF-8 -"$(fileformat)" -o markdown $(patsubst %,-%,$(l10nfiles)) -"$(potfile)"
  10. # Invoke from root dir of translated files
  11. # masterdir: path to dir containing untranslated files
  12. # pofile: path to PO file
  13. mkpo:
  14.     po4a-gettextize -M UTF-8 -L UTF-8 -"$(fileformat)" -o markdown $(patsubst %,-%,$(l10nfiles)) $(patsubst %,-$(masterdir)/%,$(l10nfiles)) -"$(pofile)"
  15. # Invoke from inside basedir of master files
  16. # pofile: path to PO file
  17. updatepo:
  18.     po4a-updatepo -M UTF-8 -"$(fileformat)" -o markdown $(patsubst %,-%,$(l10nfiles)) -"$(pofile)"
  19. # Invoke from root dir of translated files
  20. # masterdir: path to dir containing untranslated files
  21. # pofile: path to PO file
  22. $(l10nfiles): % : $(masterdir)/%
  23.     po4a-translate -M UTF-8 -L UTF-8 -"$(threshold)" -"$(fileformat)" -o markdown $(patsubst %,-$(masterdir)/%,$@) -"$(pofile)" -"$@"
  24. .PHONYmkpot mkpo $(l10nfiles)