File indexing completed on 2024-05-12 04:17:32

0001 #!/bin/bash
0002 
0003 # ===========================================================
0004 #
0005 # This file is a part of digiKam project
0006 # https://www.digikam.org
0007 #
0008 # Date:        2016-08-15
0009 # Description: Script to find no really internationlized source code.
0010 #
0011 # Copyright (C) 2016-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0012 #
0013 # SPDX-License-Identifier: BSD-3-Clause
0014 #
0015 # ============================================================
0016 
0017 stringA="klocalizedstring.h"
0018 stringB="18n"
0019 
0020 # run loop for each file in the directory
0021 
0022 for i in `find \( -name '*.cpp' -o -name '*.h' \)` ; do
0023 
0024    # check if file contains "string B"
0025    # if true then filename is not printed
0026 
0027    if [[ `egrep $stringB $i | wc -l` -eq 0 ]] ; then
0028 
0029       # check if file contains "string A"
0030       # if false then file name is not printed
0031 
0032       if [[ `egrep $stringA $i | wc -l` -gt 0 ]] ; then
0033 
0034          # file name is printed only if "string A" is present and "string B" is absent
0035 
0036          echo "$i\n"
0037 
0038       fi
0039 
0040    fi
0041 
0042 done