From 74b4f27428485d69d7b1e8891a184001e71abb97 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Sun, 20 Dec 2015 16:58:54 +0800 Subject: [PATCH] Avoid to show non-latin numbers in the UI --- .../github/shadowsocks/preferences/SummaryPreference.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/com/github/shadowsocks/preferences/SummaryPreference.scala b/src/main/scala/com/github/shadowsocks/preferences/SummaryPreference.scala index 4e5339a1..91f44752 100644 --- a/src/main/scala/com/github/shadowsocks/preferences/SummaryPreference.scala +++ b/src/main/scala/com/github/shadowsocks/preferences/SummaryPreference.scala @@ -1,5 +1,7 @@ package com.github.shadowsocks.preferences +import java.util.Locale + import android.preference.Preference /** @@ -15,5 +17,5 @@ trait SummaryPreference extends Preference { * * @return the summary with appropriate string substitution */ - override def getSummary = String.format(super.getSummary.toString, getSummaryValue) + override def getSummary = super.getSummary.toString.formatLocal(Locale.ENGLISH, getSummaryValue) }