Skip to content

Commit

Permalink
add fr language
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed Jun 26, 2023
1 parent 3a43f8b commit d6783d3
Show file tree
Hide file tree
Showing 6 changed files with 6,620 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,5 @@ internationalization/.vscode/settings.json
internationalization/~$zh_CN.xlsx

GeoDamake.opt
internationalization/credentials.json
internationalization/token.json
4 changes: 4 additions & 0 deletions BuildTools/macosx/code_sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ def ProcessDependency(dylib_path, cid):
dylib_path = '/opt/homebrew/opt/icu4c/lib/libicuuc.71.dylib'
if dylib_path == '@loader_path/libicuuc.72.dylib':
dylib_path = '/opt/homebrew/opt/icu4c/lib/libicuuc.72.dylib'
if dylib_path == '@loader_path/libicuuc.73.dylib':
dylib_path = '/opt/homebrew/opt/icu4c/lib/libicuuc.73.dylib'
if dylib_path == '@loader_path/libicudata.71.dylib':
dylib_path = '/opt/homebrew/opt/icu4c/lib/libicudata.71.dylib'
if dylib_path == '@loader_path/libicudata.72.dylib':
dylib_path = '/opt/homebrew/opt/icu4c/lib/libicudata.72.dylib'
if dylib_path == '@loader_path/libicudata.73.dylib':
dylib_path = '/opt/homebrew/opt/icu4c/lib/libicudata.73.dylib'
if dylib_path == '@loader_path/libbrotlicommon.1.dylib':
dylib_path = '/opt/homebrew/opt/brotli/lib/libbrotlicommon.1.dylib'
if dylib_path == '@rpath/libsharpyuv.0.dylib':
Expand Down
13 changes: 6 additions & 7 deletions internationalization/google_sheets_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pickle
import os.path
import argparse
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
Expand All @@ -23,21 +24,19 @@ def google_get_creds():
# The file token.pickle stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
if os.path.exists('token.pickle'):
with open('token.pickle', 'rb') as token:
creds = pickle.load(token)
if os.path.exists('token.json'):
creds = Credentials.from_authorized_user_file('token.json', SCOPES)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json', SCOPES)
creds = flow.run_local_server()
creds = flow.run_local_server(port=0)
# Save the credentials for the next run
with open('token.pickle', 'wb') as token:
pickle.dump(creds, token)

with open('token.json', 'w', encoding='utf8') as token:
token.write(creds.to_json())
return creds

def google_get_po_items(locale_code):
Expand Down
Binary file added internationalization/lang/fr/GeoDa.mo
Binary file not shown.
Loading

0 comments on commit d6783d3

Please sign in to comment.