Skip to content

Commit 75a69f4

Browse files
update translations
1 parent 100d9ed commit 75a69f4

File tree

6 files changed

+39
-19
lines changed

6 files changed

+39
-19
lines changed

app/build.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#Build Properties
2-
#Fri Jun 22 07:28:41 EDT 2018
2+
#Sat Aug 04 08:23:22 EDT 2018
33
version_minor=9
4-
version_build=2
4+
version_build=3
55
version_patch=2
6-
version_major=1
76
version_store=40
7+
version_major=1

app/src/main/java/com/vrem/wifianalyzer/wifi/scanner/Scanner.java

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.apache.commons.collections4.IterableUtils;
3333

3434
import java.util.ArrayList;
35-
import java.util.Collections;
3635
import java.util.List;
3736

3837
class Scanner implements ScannerService {
@@ -56,7 +55,9 @@ class Scanner implements ScannerService {
5655

5756
@Override
5857
public void update() {
59-
performWiFiScan();
58+
enableWiFi();
59+
scanResults();
60+
wiFiData = transformer.transformToWiFiData(cache.getScanResults(), wiFiInfo(), wifiConfiguration());
6061
IterableUtils.forEach(updateNotifiers, new UpdateClosure());
6162
}
6263

@@ -124,24 +125,43 @@ List<UpdateNotifier> getUpdateNotifiers() {
124125
return updateNotifiers;
125126
}
126127

127-
private void performWiFiScan() {
128-
List<ScanResult> scanResults = Collections.emptyList();
129-
WifiInfo wifiInfo = null;
130-
List<WifiConfiguration> configuredNetworks = null;
128+
private void enableWiFi() {
131129
try {
132130
if (!wifiManager.isWifiEnabled()) {
133131
wifiManager.setWifiEnabled(true);
134132
}
133+
} catch (Exception e) {
134+
// critical error: do not die
135+
}
136+
}
137+
138+
private void scanResults() {
139+
try {
135140
if (wifiManager.startScan()) {
136-
scanResults = wifiManager.getScanResults();
141+
List<ScanResult> scanResults = wifiManager.getScanResults();
142+
cache.add(scanResults);
137143
}
138-
wifiInfo = wifiManager.getConnectionInfo();
139-
configuredNetworks = wifiManager.getConfiguredNetworks();
140144
} catch (Exception e) {
141-
// critical error: set to no results and do not die
145+
// critical error: do not die
146+
}
147+
}
148+
149+
private WifiInfo wiFiInfo() {
150+
try {
151+
return wifiManager.getConnectionInfo();
152+
} catch (Exception e) {
153+
// critical error: do not die
154+
return null;
155+
}
156+
}
157+
158+
private List<WifiConfiguration> wifiConfiguration() {
159+
try {
160+
return wifiManager.getConfiguredNetworks();
161+
} catch (Exception e) {
162+
// critical error: do not die
163+
return new ArrayList<>();
142164
}
143-
cache.add(scanResults);
144-
wiFiData = transformer.transformToWiFiData(cache.getScanResults(), wifiInfo, configuredNetworks);
145165
}
146166

147167
private class UpdateClosure implements Closure<UpdateNotifier> {

app/src/main/res/values-es/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<string name="no_data">"Sin datos"</string>
4444
<string name="no_data_msg">"Por favor, visite frecuentemente preguntas sección en nuestro sitio web."</string>
4545
<string name="no_data_geo_warning">"Algunos usuarios de Android OS 6 (Marshmallow) han informado de que el servicio de localización debe estar habilitado para ver las redes Wi-Fi. Usuarios de Marshmallow pueden tener que activar el servicio de localización, aunque WiFiAnalyzer no lo requiera explícitamente. Parece ser atribuido a un problema potencial de Android 6 que necesita el servicio de localización para las redes WiFi."</string>
46-
<string name="permission_msg">"As of Android Marshmallow, location permissions are required to perform a WiFi scan. You will be prompted to enable location services/permissions. Since this app does not require internet access, you can be confident that this app cannot transmit your location!"</string>
46+
<string name="permission_msg">"A partir de Android Marshmallow, se requieren permisos de ubicación para realizar un escaneo WiFi. Se le pedirá que habilite los servicios / permisos de ubicación. Como esta aplicación no requiere acceso a Internet, puede estar seguro de que esta aplicación no puede transmitir su ubicación!"</string>
4747

4848
<string name="export_not_available">"Exportación no disponible"</string>
4949

app/src/main/res/values-fr/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<string name="no_data">"Aucune donnée"</string>
4242
<string name="no_data_msg">"Veuillez visiter régulièrement les section sur notre site Web."</string>
4343
<string name="no_data_geo_warning">"Certains utilisateurs fonctionnant sous Android OS+ 6 (Marshmallow) ont indiqué que le service de géolocalisation devait être activé pour que l\'application puisse fonctionner correctement. Si vous utilisez Marshmallow, activer le service de géolocalisation pourrait résoudre le problème, même si WiFiAnalyzer ne le demande pas explicitement. Ceci semble être dû à un problème avec Android OS 6+ qui requiert le service de géolocalisation d\'être actif afin d\'accéder aux réseaux Wi-Fi."</string>
44-
<string name="permission_msg">"As of Android Marshmallow, location permissions are required to perform a WiFi scan. You will be prompted to enable location services/permissions. Since this app does not require internet access, you can be confident that this app cannot transmit your location!"</string>
44+
<string name="permission_msg">"À partir de Android Marshmallow, les autorisations de localisation sont requises pour effectuer un scan WiFi. Vous serez invité à activer les services / autorisations de localisation. Depuis cette application ne nécessite pas d'accès Internet, vous pouvez être sûr que cette application ne peut pas transmettre votre position!"</string>
4545

4646
<string name="export_not_available">"Export non disponible"</string>
4747

app/src/main/res/values-pt/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<string name="no_data">"Sem Informações"</string>
4242
<string name="no_data_msg">"Por favor, visite com freqüência as perguntas sobre em nosso site."</string>
4343
<string name="no_data_geo_warning">"Alguns usuários do Android OS 6+ (Marshmallow) relataram que o serviço de localização deve estar habilitado para ver as redes Wi-Fi. Usuários de Marshmallow podem ter que ligar o serviço de localização, apesar de WiFiAnalyzer não exige explicitamente. Parece ser atribuída a um potencial problema do Android 6+ que precisa o serviço de localização para ver as redes WiFi."</string>
44-
<string name="permission_msg">"As of Android Marshmallow, location permissions are required to perform a WiFi scan. You will be prompted to enable location services/permissions. Since this app does not require internet access, you can be confident that this app cannot transmit your location!"</string>
44+
<string name="permission_msg">"A partir do Android Marshmallow, as permissões de localização são necessárias para realizar uma verificação de WiFi. Você será solicitado a ativar serviços / permissões de localização. Como este aplicativo não requer acesso à Internet, você pode ter certeza de que este aplicativo não pode transmitir sua localização!"</string>
4545

4646
<string name="export_not_available">"Não foi possível exportar"</string>
4747

app/src/main/res/values-ru/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<string name="no_data">"Нет данных"</string>
4242
<string name="no_data_msg">"Пожалуйста, посетите часто задаваемые вопросы на нашем сайте."</string>
4343
<string name="no_data_geo_warning">"Некоторые пользователи Android OS 6+ (Marshmallow) сообщили, что услуга определения местоположения должна быть включена для того, чтобы WiFiAnalyzer увидел WiFi сети. Поэтому Вам, возможно, понадобится включить службу определения местоположения, даже если WiFiAnalyzer этого явно не требует."</string>
44-
<string name="permission_msg">"As of Android Marshmallow, location permissions are required to perform a WiFi scan. You will be prompted to enable location services/permissions. Since this app does not require internet access, you can be confident that this app cannot transmit your location!"</string>
44+
<string name="permission_msg">"Начиная с Android Marshmallow, разрешения на размещение необходимы для выполнения сканирования WiFi. Вам будет предложено включить службы определения местоположения / разрешения. Поскольку это приложение не требует доступа в Интернет, вы можете быть уверены, что это приложение не сможет передать ваше местоположение!"</string>
4545

4646
<string name="export_not_available">"Экспорт не доступен"</string>
4747

0 commit comments

Comments
 (0)