Skip to content

Commit

Permalink
Solve the LANG bug by replacing LANG by LANGUAGE. /!\ It should be mo…
Browse files Browse the repository at this point in the history
…dify in scripts too, especially in gmaps.
  • Loading branch information
tobiasBora committed Jul 17, 2013
1 parent 06d883d commit 38c6f86
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Doc/Plugins/Example Plugins/GoogleMaps/gmaps
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
if echo "$1" |egrep "^http" >/dev/null 2>&1;then
xdg-open "$1" &
else
xdg-open http://"$1&hl=$LANG" &
xdg-open http://"$1&hl=$LANGUAGE" &
fi
4 changes: 2 additions & 2 deletions Microphone/osd_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def transText(text):
with open(home+"/.palaver.d/UserInfo") as f:
for each in f:
line = each.replace('\n','')
if line.startswith("LANG="):
language = line.replace("LANG=","").replace(" ","")
if line.startswith("LANGUAGE="):
language = line.replace("LANGUAGE=","").replace(" ","")
try:
if language == "en":
return text
Expand Down
2 changes: 1 addition & 1 deletion Recognition/config/BlankInfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FIRST=
LAST=
EMAIL=
LANG=en
LANGUAGE=en
4 changes: 2 additions & 2 deletions installDefault
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ def main():
return 0

if __name__ == "__main__":
res = subprocess.Popen("zenity --forms --add-entry='First Name' --add-entry='Last Name' --add-entry='Email' --add-entry='Language (en,es,pt)' --text='User Information' --title='Palaver User Configurationon'", shell=True, stdout=subprocess.PIPE).communicate()[0].replace('\n','')
res = subprocess.Popen("zenity --forms --add-entry='First Name' --add-entry='Last Name' --add-entry='Email' --add-entry='Language (en,es,fr,pt)' --text='User Information' --title='Palaver User Configuration'", shell=True, stdout=subprocess.PIPE).communicate()[0].replace('\n','')
res = res.split("|")
with open(home+"/.palaver.d/UserInfo",'w') as data:
data.write("FIRST="+res[0])
data.write("\nLAST="+res[1])
data.write("\nEMAIL="+res[2])
data.write("\nLANG="+res[3])
data.write("\nLANGUAGE="+res[3]+"\n")
EntryExample()
main()
2 changes: 1 addition & 1 deletion send_speech
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# lang=es or something.
# Multiple results
#URL="http://www.google.com/speech-api/v1/recognize?lang=en&client=chromium&maxresults=6"
URL="https://www.google.com/speech-api/v1/recognize?lang=$LANG&client=chromium"
URL="https://www.google.com/speech-api/v1/recognize?lang=$LANGUAGE&client=chromium"

if [ -z "$1" ];then
echo ""
Expand Down

0 comments on commit 38c6f86

Please sign in to comment.