Skip to content

Commit

Permalink
Merge pull request #1808 from SmartThingsCommunity/bugfix/translation…
Browse files Browse the repository at this point in the history
…_newline

Translation: make translation deploy tolerant of extra newlines
  • Loading branch information
greens authored Dec 9, 2024
2 parents f8f29b9 + c49efcc commit 5f9650e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
13 changes: 7 additions & 6 deletions tools/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@
with open(localization_file) as csvfile:
reader = csv.reader(csvfile)
for row in reader:
print("en: "+row[0]+" "+LOCALE+": "+row[1])
subprocess.run(
"find . -name 'fingerprints.yml' | xargs sed -i -E 's/deviceLabel ?: \"?"+row[0].translate(slash_escape)+"\"?/deviceLabel: "+row[1].translate(slash_escape)+"/g'",
shell=True,
cwd=os.path.dirname(current_path)
)
if len(row) > 1:
print("en: "+row[0]+" "+LOCALE+": "+row[1])
subprocess.run(
"find . -name 'fingerprints.yml' | xargs sed -i -E 's/deviceLabel ?: \"?"+row[0].translate(slash_escape)+"\"?/deviceLabel: "+row[1].translate(slash_escape)+"/g'",
shell=True,
cwd=os.path.dirname(current_path)
)

subprocess.run("git status", shell=True)

Expand Down
3 changes: 1 addition & 2 deletions tools/localizations/cn.csv
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,4 @@ Aqara Wireless Mini Switch T1,Aqara 无线开关 T1
"WallHero Outlet",智能墙面五孔插座
"WallHero Remote Control (4-Inch)",语音场景(4寸)面板
"Zemismart ZM02 Smart Curtain",Zemismart ZM02 智能窗帘
"Zemismart ZM25C Smart Curtain",Zemismart ZM25C 智能窗帘

"Zemismart ZM25C Smart Curtain",Zemismart ZM25C 智能窗帘

0 comments on commit 5f9650e

Please sign in to comment.