Branch libreoffice-5-0-4
[LibreOffice.git] / bin / ui-translatable.sh
blob1d88d9df93452ad39a88e774b27d50de19eaf24f
1 #!/bin/bash
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 prints lines from .ui files, where the translatable="yes" attribute
9 # was not set -- presumably by mistake. It prints a few false positives though.
11 for i in `git ls-files *.ui`; do
12 for j in "label" "title" "text" "format" "copyright" "comments" "preview_text" "tooltip" "message" ; do
13 grep -s "\<property name\=\"$j\"" $i | grep -v "translatable\=\"yes" | grep -v "translatable\=\"no" | grep -v gtk\- | grep ">.*[A-Za-z].*<";
14 if [ "$?" -eq 0 ] ;
15 then echo "Source: $i^";
17 done
18 grep -s "<item>" $i | grep -v "translatable\=\"yes" | grep -v "translatable\=\"no" | grep ">.*[A-Za-z].*<";
19 if [ "$?" -eq 0 ] ;
20 then echo "Source: $i^";
22 done