Skip to content

Commit 4a57153

Browse files
committed
android: improve qa translation.
1 parent 4ec400e commit 4a57153

15 files changed

+63
-71
lines changed

android/app/src/main/java/com/btsplusplus/fowallet/ActivityDepositAndWithdraw.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import bitshares.*
99
import com.btsplusplus.fowallet.gateway.GatewayAssetItemData
1010
import com.btsplusplus.fowallet.gateway.GatewayBase
1111
import com.btsplusplus.fowallet.gateway.RuDEX
12+
import com.btsplusplus.fowallet.utils.VcUtils
1213
import com.fowallet.walletcore.bts.ChainObjectManager
1314
import com.fowallet.walletcore.bts.WalletManager
1415
import kotlinx.android.synthetic.main.activity_deposit_and_withdraw.*
@@ -139,9 +140,7 @@ class ActivityDepositAndWithdraw : BtsppActivity() {
139140
}
140141

141142
private fun onGatewayAssetsFAQClicked() {
142-
// [统计]
143-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_deposit_withdraw"))
144-
goToWebView(resources.getString(R.string.kVcTitleWhatIsGatewayAssets), "https://btspp.io/qam.html#qa_deposit_withdraw")
143+
VcUtils.gotoQaView(this, "qa_deposit_withdraw", resources.getString(R.string.kVcTitleWhatIsGatewayAssets))
145144
}
146145

147146
private fun onCurrentGatewayClicked() {

android/app/src/main/java/com/btsplusplus/fowallet/ActivityIndexCollateral.kt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,13 @@ class ActivityIndexCollateral : BtsppActivity() {
7171

7272
// 帮助按钮
7373
findViewById<ImageView>(R.id.tip_link_curr_feed).setOnClickListener {
74-
// [统计]
75-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_feed_settlement"))
76-
goToWebView(resources.getString(R.string.kDebtTipTitleFeedAndCallPrice), "https://btspp.io/qam.html#qa_feed_settlement")
74+
VcUtils.gotoQaView(this, "qa_feed_settlement", resources.getString(R.string.kDebtTipTitleFeedAndCallPrice))
7775
}
7876
findViewById<ImageView>(R.id.tip_link_ratio).setOnClickListener {
79-
// [统计]
80-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_ratio"))
81-
goToWebView(resources.getString(R.string.kDebtTipTitleWhatIsRatio), "https://btspp.io/qam.html#qa_ratio")
77+
VcUtils.gotoQaView(this, "qa_ratio", resources.getString(R.string.kDebtTipTitleWhatIsRatio))
8278
}
8379
findViewById<ImageView>(R.id.tip_link_target_ratio).setOnClickListener {
84-
// [统计]
85-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_target_ratio"))
86-
goToWebView(resources.getString(R.string.kDebtTipTitleWhatIsTargetRatio), "https://btspp.io/qam.html#qa_target_ratio")
80+
VcUtils.gotoQaView(this, "qa_target_ratio", resources.getString(R.string.kDebtTipTitleWhatIsTargetRatio))
8781
}
8882

8983
// 监听事件

android/app/src/main/java/com/btsplusplus/fowallet/ActivityRegister.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import android.support.design.widget.TabLayout
55
import android.support.v4.app.Fragment
66
import android.support.v4.view.ViewPager
77
import android.view.animation.OvershootInterpolator
8-
import bitshares.xmlstring
98
import kotlinx.android.synthetic.main.activity_register.*
109
import java.lang.reflect.Field
1110

@@ -41,7 +40,8 @@ class ActivityRegister : BtsppActivity() {
4140
}
4241

4342
private fun onTermsOfServiceClicked() {
44-
goToWebView(R.string.kVcTitleAgreement.xmlstring(this), "https://btspp.io/agreement.html")
43+
val url = "https://btspp.io/${resources.getString(R.string.userAgreementHtmlFileName)}"
44+
goToWebView(resources.getString(R.string.kVcTitleAgreement), url)
4545
}
4646

4747
private fun setViewPager() {

android/app/src/main/java/com/btsplusplus/fowallet/ActivityVoting.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import android.support.v4.app.Fragment
55
import android.view.View
66
import android.widget.TextView
77
import bitshares.*
8+
import com.btsplusplus.fowallet.utils.VcUtils
89
import com.fowallet.walletcore.bts.BitsharesClientManager
910
import com.fowallet.walletcore.bts.ChainObjectManager
1011
import com.fowallet.walletcore.bts.WalletManager
@@ -48,9 +49,7 @@ class ActivityVoting : BtsppActivity() {
4849
current_proxy_of_voting.visibility = View.INVISIBLE
4950
current_proxy_name_of_voting.text = ""
5051
current_proxy_help_of_voting.setOnClickListener {
51-
// [统计]
52-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_proxy"))
53-
goToWebView(resources.getString(R.string.kVcVoteWhatIsProxy), "https://btspp.io/qam.html#qa_proxy")
52+
VcUtils.gotoQaView(this, "qa_proxy", resources.getString(R.string.kVcVoteWhatIsProxy))
5453
}
5554

5655
// 底部按钮

android/app/src/main/java/com/btsplusplus/fowallet/FragmentFeedPrice.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import android.widget.LinearLayout
1414
import android.widget.TableRow
1515
import android.widget.TextView
1616
import bitshares.*
17+
import com.btsplusplus.fowallet.utils.VcUtils
1718
import com.fowallet.walletcore.bts.ChainObjectManager
1819
import org.json.JSONArray
1920
import org.json.JSONObject
@@ -262,9 +263,7 @@ class FragmentFeedPrice : BtsppFragment() {
262263
_ctx = inflater.context
263264
val v: View = inflater.inflate(R.layout.fragment_feed_price, container, false)
264265
v.findViewById<ImageView>(R.id.tip_link_feedprice).setOnClickListener {
265-
// [统计]
266-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_feedprice"))
267-
activity!!.goToWebView(_ctx!!.resources.getString(R.string.kVcTitleWhatIsFeedPrice), "https://btspp.io/qam.html#qa_feedprice")
266+
VcUtils.gotoQaView(activity!!, "qa_feedprice", resources.getString(R.string.kVcTitleWhatIsFeedPrice))
268267
}
269268
_currentView = v
270269
// refresh UI

android/app/src/main/java/com/btsplusplus/fowallet/FragmentLoginAccountMode.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import android.widget.EditText
1212
import android.widget.ImageView
1313
import android.widget.LinearLayout
1414
import bitshares.*
15+
import com.btsplusplus.fowallet.utils.VcUtils
1516
import com.fowallet.walletcore.bts.ChainObjectManager
1617
import com.fowallet.walletcore.bts.WalletManager
1718
import org.json.JSONObject
@@ -191,9 +192,7 @@ class FragmentLoginAccountMode : Fragment() {
191192
loginBitshares_AccountMode(account_name, password, trade_password)
192193
}
193194
v.findViewById<ImageView>(R.id.tip_link_trading_password).setOnClickListener {
194-
// [统计]
195-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_trading_password"))
196-
activity!!.goToWebView(_ctx!!.resources.getString(R.string.kVcTitleWhatIsTradePassowrd), "https://btspp.io/qam.html#qa_trading_password")
195+
VcUtils.gotoQaView(activity!!, "qa_trading_password", resources.getString(R.string.kVcTitleWhatIsTradePassowrd))
197196
}
198197
// 导入到已有钱包:隐藏交易密码。
199198
if (!_checkActivePermission) {

android/app/src/main/java/com/btsplusplus/fowallet/FragmentLoginBrainKeyMode.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import android.widget.ImageView
1313
import android.widget.LinearLayout
1414
import bitshares.*
1515
import com.btsplusplus.fowallet.utils.CommonLogic
16+
import com.btsplusplus.fowallet.utils.VcUtils
1617
import com.fowallet.walletcore.bts.WalletManager
1718
import org.json.JSONObject
1819

@@ -81,9 +82,7 @@ class FragmentLoginBrainKeyMode : Fragment() {
8182
}
8283

8384
v.findViewById<ImageView>(R.id.tip_link_trading_password_from_brain_key_mode).setOnClickListener {
84-
// [统计]
85-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_trading_password"))
86-
activity!!.goToWebView(_ctx!!.resources.getString(R.string.kVcTitleWhatIsTradePassowrd), "https://btspp.io/qam.html#qa_trading_password")
85+
VcUtils.gotoQaView(activity!!, "qa_trading_password", resources.getString(R.string.kVcTitleWhatIsTradePassowrd))
8786
}
8887

8988
return v

android/app/src/main/java/com/btsplusplus/fowallet/FragmentLoginPrivateKeyMode.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import android.widget.ImageView
1313
import android.widget.LinearLayout
1414
import bitshares.*
1515
import com.btsplusplus.fowallet.utils.CommonLogic
16+
import com.btsplusplus.fowallet.utils.VcUtils
1617

1718

1819
// TODO: Rename parameter arguments, choose names that match
@@ -101,14 +102,10 @@ class FragmentLoginPrivateKeyMode : Fragment() {
101102
loginBitshares_PrivateKeyMode(active_privatekey, trade_password)
102103
}
103104
v.findViewById<ImageView>(R.id.tip_link_active_privatekey).setOnClickListener {
104-
// [统计]
105-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_active_privatekey"))
106-
activity!!.goToWebView(_ctx!!.resources.getString(R.string.kVcTitleWhatIsActivePrivateKey), "https://btspp.io/qam.html#qa_active_privatekey")
105+
VcUtils.gotoQaView(activity!!, "qa_active_privatekey", resources.getString(R.string.kVcTitleWhatIsActivePrivateKey))
107106
}
108107
v.findViewById<ImageView>(R.id.tip_link_trading_password).setOnClickListener {
109-
// [统计]
110-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_trading_password"))
111-
activity!!.goToWebView(_ctx!!.resources.getString(R.string.kVcTitleWhatIsTradePassowrd), "https://btspp.io/qam.html#qa_trading_password")
108+
VcUtils.gotoQaView(activity!!, "qa_trading_password", resources.getString(R.string.kVcTitleWhatIsTradePassowrd))
112109
}
113110
// 导入到已有钱包:隐藏交易密码。
114111
if (!_checkActivePermission) {

android/app/src/main/java/com/btsplusplus/fowallet/FragmentMarginRanking.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import android.widget.LinearLayout
1414
import android.widget.TextView
1515
import bitshares.*
1616
import com.btsplusplus.fowallet.kline.TradingPair
17+
import com.btsplusplus.fowallet.utils.VcUtils
1718
import com.fowallet.walletcore.bts.ChainObjectManager
1819
import org.json.JSONArray
1920
import org.json.JSONObject
@@ -251,9 +252,7 @@ class FragmentMarginRanking : BtsppFragment() {
251252
_ctx = inflater.context
252253
val v: View = inflater.inflate(R.layout.fragment_margin_ranking, container, false)
253254
v.findViewById<ImageView>(R.id.tip_link_feedprice).setOnClickListener {
254-
// [统计]
255-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_feedprice"))
256-
activity!!.goToWebView(_ctx!!.resources.getString(R.string.kVcTitleWhatIsFeedPrice), "https://btspp.io/qam.html#qa_feedprice")
255+
VcUtils.gotoQaView(activity!!, "qa_feedprice", resources.getString(R.string.kVcTitleWhatIsFeedPrice))
257256
}
258257
_currentView = v
259258
// refresh UI

android/app/src/main/java/com/btsplusplus/fowallet/FragmentMarketInfo.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import android.widget.FrameLayout
1414
import android.widget.LinearLayout
1515
import android.widget.TextView
1616
import bitshares.*
17+
import com.btsplusplus.fowallet.utils.VcUtils
1718
import com.crashlytics.android.Crashlytics
1819
import com.fowallet.walletcore.bts.ChainObjectManager
1920
import org.json.JSONArray
@@ -214,9 +215,7 @@ class FragmentMarketInfo : BtsppFragment() {
214215
inmain.setTextColor(resources.getColor(R.color.theme01_textColorGray))
215216
inmain.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12f)
216217
inmain.setOnClickListener {
217-
// [统计]
218-
btsppLogCustom("qa_tip_click", jsonObjectfromKVS("qa", "qa_gateway"))
219-
activity!!.goToWebView(_context!!.resources.getString(R.string.kVcTitleWhatIsGateway), "https://btspp.io/qam.html#qa_gateway")
218+
VcUtils.gotoQaView(activity!!, "qa_gateway", resources.getString(R.string.kVcTitleWhatIsGateway))
220219
}
221220
flmain.addView(inmain, inmain_layout_params)
222221
}

0 commit comments

Comments
 (0)