summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-07-30 16:13:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-07-30 16:13:07 +0100
commit8a1f6b6ec39b849a83a5c394635af166a0ff692b (patch)
tree12f35b90070bc605d650fa83f9c46cd25276e376 /bin
parent9dca925dd94258116781defc534b40bf16ee435a (diff)
add a utility to estimate how much new .ui files we need
Change-Id: I9b2a2ae1e8d74df701b4a2fcf28460759a95d639
Diffstat (limited to 'bin')
-rwxr-xr-xbin/count-todo-dialogs24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/count-todo-dialogs b/bin/count-todo-dialogs
new file mode 100755
index 000000000000..fef854df302f
--- /dev/null
+++ b/bin/count-todo-dialogs
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Run this from the source root dir to count:
+# a) the number of .ui files
+# b) the estimated amount of additional .ui files required
+
+converted=`ls */uiconfig/ui/*.ui */uiconfig/*/ui/*.ui|wc -l`
+echo $converted .ui files currently exist
+
+dialogs=`git grep -h Dialog -- *.src|grep -v DialogControl|grep -v HelpID|grep -v define|grep -v String|grep -v QuickHelpText|grep -v "Text \[ en-US \]"|grep -v HelpId|grep -v "Cancel-Button"|grep -v \"Dialog\"|grep -v "Dialog Controls" |grep -v .uno:|grep -v "//"|grep -v include|grep -v "paste region"|grep -v "Tabpage-Dialog"|sed -e 's/^ *//g' -e 's/ *$//g'|cut -d' ' -f2- |sort|uniq|wc -l`
+
+tabpages=`git grep -h TabPage -- *.src|grep -v DialogControl|grep -v HelpID|grep -v define|grep -v String|grep -v QuickHelpText|grep -v "Text \[ en-US \]"|grep -v HelpId|grep -v "Cancel-Button"|grep -v \"Dialog\"|grep -v "Dialog Controls" |grep -v .uno:|grep -v "//"|grep -v include|grep -v "paste region"|grep -v "Tabpage-Dialog"|sed -e 's/^ *//g' -e 's/ *$//g'|cut -d' ' -f2- |sort|uniq|wc -l`
+
+echo There are $dialogs unconverted dialogs
+echo There are $tabpages unconverted tabpages
+
+num=$(($dialogs + $tabpages))
+echo An estimated additional $num .ui are required