scripts: rename loleaflet -> browser
Change-Id: I108162981aa66a804a855a18f45f7369c20edfe0 Signed-off-by: Henry Castro <hcastro@collabora.com>pull/3597/head
parent
041ab53bb0
commit
5864481c13
|
@ -17,7 +17,7 @@ coolServerUrl = "http://localhost:9980"
|
|||
solrServerUrl = "http://localhost:8983"
|
||||
|
||||
documentPath = "Docs/"
|
||||
coolInstance = coolServerUrl + "/loleaflet/f6d368a0a/cool.html"
|
||||
coolInstance = coolServerUrl + "/browser/f6d368a0a/cool.html"
|
||||
solrCollectionName = "documents"
|
||||
|
||||
# Templates
|
||||
|
|
|
@ -105,7 +105,7 @@ if __name__ == "__main__":
|
|||
poFile = dir + lang + '/svtools/messages.po'
|
||||
extractFromPo(poFile, ["STR_ARR_SVT_LANGUAGE_TABLE"], translations)
|
||||
|
||||
f = open(onlineDir + '/loleaflet/l10n/locore/' + lang + '.json', 'w')
|
||||
f = open(onlineDir + '/browser/l10n/locore/' + lang + '.json', 'w')
|
||||
f.write('{\n')
|
||||
|
||||
writeComma = False
|
||||
|
|
|
@ -75,7 +75,7 @@ def extractMenuCommands(path):
|
|||
commands = []
|
||||
|
||||
# extract from the menu specifications
|
||||
f = open(path + '/loleaflet/src/control/Control.Menubar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.Menubar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("uno:") >= 0 and line.find("name:") < 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
@ -92,7 +92,7 @@ def extractContextCommands(path):
|
|||
commands = []
|
||||
|
||||
# extract from the comments whitelist
|
||||
f = open(path + '/loleaflet/src/control/Control.ContextMenu.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.ContextMenu.js', 'r')
|
||||
readingCommands = False
|
||||
for line in f:
|
||||
if line.find('UNOCOMMANDS_EXTRACT_START') >= 0:
|
||||
|
@ -102,17 +102,17 @@ def extractContextCommands(path):
|
|||
elif readingCommands:
|
||||
commands += commandsFromLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.ColumnHeader.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.ColumnHeader.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.RowHeader.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.RowHeader.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.Tabs.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.Tabs.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
@ -128,74 +128,74 @@ def extractToolbarCommands(path):
|
|||
commands = []
|
||||
|
||||
# extract from the toolbars
|
||||
f = open(path + '/loleaflet/src/control/Control.Toolbar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.Toolbar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.MobileBottomBar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.MobileBottomBar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.MobileTopBar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.MobileTopBar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.MobileWizardBuilder.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.MobileWizardBuilder.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path +
|
||||
'/loleaflet/src/control/Control.NotebookbarBuilder.js', 'r')
|
||||
'/browser/src/control/Control.NotebookbarBuilder.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.Notebookbar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.Notebookbar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.NotebookbarWriter.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.NotebookbarWriter.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.NotebookbarCalc.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.NotebookbarCalc.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path +
|
||||
'/loleaflet/src/control/Control.NotebookbarImpress.js', 'r')
|
||||
'/browser/src/control/Control.NotebookbarImpress.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.NotebookbarDraw.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.NotebookbarDraw.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.PresentationBar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.PresentationBar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.SearchBar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.SearchBar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.StatusBar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.StatusBar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
||||
f = open(path + '/loleaflet/src/control/Control.TopToolbar.js', 'r')
|
||||
f = open(path + '/browser/src/control/Control.TopToolbar.js', 'r')
|
||||
for line in f:
|
||||
if line.find("_UNO(") >= 0:
|
||||
commands += commandFromMenuLine(line)
|
||||
|
@ -300,7 +300,7 @@ def writeUnocommandsJS(
|
|||
'Label', type)
|
||||
|
||||
# output the unocommands.js
|
||||
f = open(onlineDir + '/loleaflet/src/unocommands.js', 'w',
|
||||
f = open(onlineDir + '/browser/src/unocommands.js', 'w',
|
||||
encoding='utf-8')
|
||||
f.write('''// Don't modify, generated using unocommands.py
|
||||
|
||||
|
@ -363,7 +363,7 @@ window.removeAccessKey = function(text) {
|
|||
def parseUnocommandsJS(onlineDir):
|
||||
strings = {}
|
||||
|
||||
f = open(onlineDir + '/loleaflet/src/unocommands.js', 'r',
|
||||
f = open(onlineDir + '/browser/src/unocommands.js', 'r',
|
||||
encoding='utf-8')
|
||||
for line in f:
|
||||
m = re.match(r"\t\'([^:]*)\':.*", line)
|
||||
|
@ -402,7 +402,7 @@ def writeTranslations(onlineDir, translationsDir, strings):
|
|||
if text == entry.msgid:
|
||||
translations[entry.msgid] = entry.msgstr
|
||||
|
||||
f = open(onlineDir + '/loleaflet/l10n/uno/' +
|
||||
f = open(onlineDir + '/browser/l10n/uno/' +
|
||||
lang + '.json', 'w', encoding='utf-8')
|
||||
f.write('{\n')
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ def extractFromPo(poFile, stringIds, untranslated):
|
|||
def parseUnocommandsJS(onlineDir):
|
||||
strings = {}
|
||||
|
||||
f = open(onlineDir + '/loleaflet/src/unocommands.js', 'r')
|
||||
f = open(onlineDir + '/browser/src/unocommands.js', 'r')
|
||||
for line in f:
|
||||
line = line.decode('utf-8')
|
||||
m = re.match(r"\t([^:]*):.*", line)
|
||||
|
@ -148,7 +148,7 @@ if __name__ == "__main__":
|
|||
|
||||
# Online UI
|
||||
|
||||
poFile = onlineDir + '/loleaflet/po/ui-' + lang.replace("-", "_") + '.po'
|
||||
poFile = onlineDir + '/browser/po/ui-' + lang.replace("-", "_") + '.po'
|
||||
po = polib.pofile(poFile,
|
||||
autodetect_encoding=False,
|
||||
encoding="utf-8",
|
||||
|
@ -161,7 +161,7 @@ if __name__ == "__main__":
|
|||
# Online help (keyboard shortcuts)
|
||||
|
||||
poFile = (onlineDir
|
||||
+ '/loleaflet/po/help-'
|
||||
+ '/browser/po/help-'
|
||||
+ lang.replace("-", "_")
|
||||
+ '.po')
|
||||
po = polib.pofile(poFile,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#! /bin/bash
|
||||
|
||||
find loleaflet/src/ -name "*.js" -exec grep ': function' \{\} \; | sed -e 's/:.*//' -e 's/^[\t ]*//' -e 's/[\t ]*$//' | grep -v " " | sort | uniq | \
|
||||
find browser/src/ -name "*.js" -exec grep ': function' \{\} \; | sed -e 's/:.*//' -e 's/^[\t ]*//' -e 's/[\t ]*$//' | grep -v " " | sort | uniq | \
|
||||
while read FUNC ; do
|
||||
NUM=`git grep "\<$FUNC\>" loleaflet/src/ | wc -l`
|
||||
NUM=`git grep "\<$FUNC\>" browser/src/ | wc -l`
|
||||
#echo "Trying $FUNC: $NUM"
|
||||
if [ "$NUM" = "1" ] ; then
|
||||
git --no-pager grep "\<$FUNC\>" loleaflet/src/
|
||||
git --no-pager grep "\<$FUNC\>" browser/src/
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue