~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to po/CheckLocale.cmake

  • Committer: The Widelands Bunnybot
  • Date: 2024-05-17 10:04:30 UTC
  • Revision ID: bunnybot@widelands.org-20240517100430-kttzovssmqti5fzx
Replace gettext with tinygettext (CB #4772 / GH #6411)
Co-authored-by: Benedikt Straub <nordfriese@noreply.codeberg.org>
Co-committed-by: Benedikt Straub <nordfriese@noreply.codeberg.org>

(by bunnybot)
524a53c0704b48c694771ce567d42ffd9a8dbbc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
file (GLOB_RECURSE pofiles ${pobasedir}/${lang}.po)
2
 
 
3
 
foreach (pofile ${pofiles})
4
 
  get_filename_component(popath ${pofile} PATH)
5
 
  string(REPLACE "${pobasedir}/" "" templatename ${popath})
6
 
  set (mofile ${localebasedir}/${lang}/LC_MESSAGES/${templatename}.mo)
7
 
  find_path(trans ${templatename}.mo ${localebasedir}/${lang}/LC_MESSAGES)
8
 
  if (trans STREQUAL "trans-NOTFOUND")
9
 
    message(FATAL_ERROR "The translation for locale ${lang} is missing for the template ${templatename}. You need to run cmake again to pick up this translation.")
10
 
  endif (trans STREQUAL "trans-NOTFOUND")
11
 
endforeach (pofile ${pofiles})