2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This script finds .ui files with incorrect translation domain set
9 # and prints the domain, the file name and the expected domain
10 # See also the discussion at https://gerrit.libreoffice.org/#/c/72973/
14 # List of modules with .ui files and their expected translation domain
41 # Iterate the keys, i.e. modules with a uiconfig subdir
42 for key
in ${!modules[@]}; do
43 # Enumerate all .ui files in each module
44 for uifile
in $
(git ls-files
${key}/uiconfig
/*\.ui
); do
45 # Check that they contain the expected domain in double quotation marks, print the line if they don't
46 grep "\<interface domain=" $uifile |
grep -v "\"${modules[${key}]}\"";
48 # Report the file name and the expected domain
49 then echo "^Problematic interface domain in file: $uifile ; should be: "${modules[${key}]}"";