aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/lang.tcl
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2016-06-13 18:42:57 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2016-06-13 18:42:57 -0400
commit65d5f68cc6dc81799c5a5d90400a2c1f0dd02547 (patch)
tree6f245ba901b87ef42fed69965aea22f5eea6b590 /SQLiteStudio3/lang.tcl
parentaeb6bad01630d325a4e768e798a7a6d44e18fdaf (diff)
parent5d9314f134ddd3dc4c853e398ac90ba247fb2e4f (diff)
Merge tag 'upstream/3.1.0'
Upstream version 3.1.0 # gpg: Signature made Mon 13 Jun 2016 06:42:54 PM EDT using RSA key ID EBE9BD91 # gpg: Good signature from "Unit 193 <unit193@gmail.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.org>" # gpg: aka "Unit 193 <unit193@ubuntu.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.com>"
Diffstat (limited to 'SQLiteStudio3/lang.tcl')
-rwxr-xr-xSQLiteStudio3/lang.tcl31
1 files changed, 31 insertions, 0 deletions
diff --git a/SQLiteStudio3/lang.tcl b/SQLiteStudio3/lang.tcl
index 00fd151..4746a8d 100755
--- a/SQLiteStudio3/lang.tcl
+++ b/SQLiteStudio3/lang.tcl
@@ -2,6 +2,7 @@
proc usage {} {
puts "$::argv0 (add|remove) <lang_name>"
+ puts "$::argv0 add_plugin <plugin name>"
puts "$::argv0 (update|release|status)"
}
@@ -111,6 +112,36 @@ switch -- $op {
puts "$k - ${perc}% ($tr / $all)"
}
}
+ "add_plugin" {
+ if {$argc != 2} {
+ usage
+ exit 1
+ }
+
+ set plug [lindex $argv 1]
+ set plugPro ../Plugins/$plug/$plug.pro
+ if {![file exists $plugPro]} {
+ puts "$plugPro does not exist."
+ exit 1
+ }
+
+ set fd [open ../Plugins/CsvImport/CsvImport.pro r]
+ set data [read $fd]
+ close $fd
+
+ set langs [list]
+ set trData "\nTRANSLATIONS += "
+ foreach {all lang} [regexp -inline -all -- {CsvImport_(\w+)\.ts} $data] {
+ append trData "\\\n\t\t${plug}_$lang.ts"
+ lappend langs $lang
+ }
+ append trData "\n"
+
+ set fd [open $plugPro a+]
+ puts $fd $trData
+ close $fd
+ puts "Added translation languages for plugin $plug:\n[join $langs \n]"
+ }
"add" - "remove" {
if {$argc != 2} {
usage