fix device independent typos

This commit is contained in:
Thomas Kuehne
2026-06-10 17:43:46 +02:00
committed by José Rebelo
parent fd03accd4c
commit 6ad6638605
25 changed files with 114 additions and 101 deletions
+13
View File
@@ -49,6 +49,7 @@
<w>eomäe</w>
<w>ericsson</w>
<w>exrizu</w>
<w>femometer</w>
<w>findphone</w>
<w>françois</w>
<w>freeyourgadget</w>
@@ -59,6 +60,7 @@
<w>gfdi</w>
<w>gideão</w>
<w>girolamo</w>
<w>glonass</w>
<w>gloryfit</w>
<w>gobbetti</w>
<w>gree</w>
@@ -69,10 +71,13 @@
<w>handcycling</w>
<w>hasants</w>
<w>hauck</w>
<w>haylou</w>
<w>heartrate</w>
<w>hiit</w>
<w>hmac</w>
<w>hplus</w>
<w>huami</w>
<w>idasen</w>
<w>ieee</w>
<w>infini</w>
<w>inkscape</w>
@@ -92,6 +97,7 @@
<w>kabaddi</w>
<w>kasha</w>
<w>kaushan</w>
<w>keephealth</w>
<w>keeshii</w>
<w>kitesurfing</w>
<w>kompact</w>
@@ -101,6 +107,8 @@
<w>lacross</w>
<w>ladbsoft</w>
<w>ladera</w>
<w>laxas</w>
<w>lefun</w>
<w>lemfo</w>
<w>lenovo</w>
<w>liebergeld</w>
@@ -119,6 +127,7 @@
<w>moondrop</w>
<w>morpheuz</w>
<w>mosenkovs</w>
<w>moyoung</w>
<w>multisport</w>
<w>musicspec</w>
<w>musicstatespec</w>
@@ -131,6 +140,7 @@
<w>onetouch</w>
<w>opentracks</w>
<w>oraclejdk</w>
<w>osmand</w>
<w>oukitel</w>
<w>paddleboarding</w>
<w>padel</w>
@@ -193,6 +203,7 @@
<w>vebryn</w>
<w>veneziano</w>
<w>vibratissimo</w>
<w>vivomove</w>
<w>wakeboarding</w>
<w>wakesurfing</w>
<w>walkjivefly</w>
@@ -201,6 +212,8 @@
<w>watchface</w>
<w>watchfaces</w>
<w>wechat</w>
<w>weixin</w>
<w>wena</w>
<w>whatsapp</w>
<w>xiaomi</w>
<w>xplus</w>
@@ -782,7 +782,7 @@ public class GBDaoGenerator {
activitySample.addIntProperty(SAMPLE_HEART_RATE).notNull().codeBeforeGetterAndSetter(OVERRIDE);
}
private static void addBloodPressureProperies(Entity activitySample) {
private static void addBloodPressureProperties(Entity activitySample) {
activitySample.addIntProperty(SAMPLE_BLOOD_PRESSURE_SYSTOLIC).codeBeforeGetter(OVERRIDE).notNull();
activitySample.addIntProperty(SAMPLE_BLOOD_PRESSURE_DIASTOLIC).codeBeforeGetter(OVERRIDE).notNull();
}
@@ -1288,7 +1288,7 @@ public class GBDaoGenerator {
private static Entity addMoyoungBloodPressureSample(Schema schema, Entity user, Entity device) {
Entity bpSample = addEntity(schema, "MoyoungBloodPressureSample");
addCommonTimeSampleProperties("AbstractBloodPressureSample", bpSample, user, device);
addBloodPressureProperies(bpSample);
addBloodPressureProperties(bpSample);
return bpSample;
}
@@ -1334,7 +1334,7 @@ public class GBDaoGenerator {
private static Entity addKeephealthBloodPressureSample(Schema schema, Entity user, Entity device) {
Entity bpSample = addEntity(schema, "KeephealthBloodPressureSample");
addCommonTimeSampleProperties("AbstractBloodPressureSample", bpSample, user, device);
addBloodPressureProperies(bpSample);
addBloodPressureProperties(bpSample);
return bpSample;
}
@@ -1528,27 +1528,27 @@ public class GBDaoGenerator {
}
private static void addNotificationFilterEntry(Schema schema, Entity notificationFilterEntity) {
Entity notificatonFilterEntry = addEntity(schema, "NotificationFilterEntry");
notificatonFilterEntry.addIdProperty().autoincrement();
Property notificationFilterId = notificatonFilterEntry.addLongProperty("notificationFilterId").notNull().getProperty();
notificatonFilterEntry.addStringProperty("notificationFilterContent").notNull();
notificatonFilterEntry.addToOne(notificationFilterEntity, notificationFilterId);
Entity notificationFilterEntry = addEntity(schema, "NotificationFilterEntry");
notificationFilterEntry.addIdProperty().autoincrement();
Property notificationFilterId = notificationFilterEntry.addLongProperty("notificationFilterId").notNull().getProperty();
notificationFilterEntry.addStringProperty("notificationFilterContent").notNull();
notificationFilterEntry.addToOne(notificationFilterEntity, notificationFilterId);
}
private static Entity addNotificationFilters(Schema schema) {
Entity notificatonFilter = addEntity(schema, "NotificationFilter");
Property appIdentifier = notificatonFilter.addStringProperty("appIdentifier").notNull().getProperty();
Entity notificationFilter = addEntity(schema, "NotificationFilter");
Property appIdentifier = notificationFilter.addStringProperty("appIdentifier").notNull().getProperty();
notificatonFilter.addIdProperty().autoincrement();
notificationFilter.addIdProperty().autoincrement();
Index indexUnique = new Index();
indexUnique.addProperty(appIdentifier);
indexUnique.makeUnique();
notificatonFilter.addIndex(indexUnique);
notificationFilter.addIndex(indexUnique);
Property notificationFilterMode = notificatonFilter.addIntProperty("notificationFilterMode").notNull().getProperty();
Property notificationFilterSubMode = notificatonFilter.addIntProperty("notificationFilterSubMode").notNull().getProperty();
return notificatonFilter;
Property notificationFilterMode = notificationFilter.addIntProperty("notificationFilterMode").notNull().getProperty();
Property notificationFilterSubMode = notificationFilter.addIntProperty("notificationFilterSubMode").notNull().getProperty();
return notificationFilter;
}
private static void addPebbleAppstoreIdEntry(Schema schema) {
@@ -2319,7 +2319,7 @@ public class GBDaoGenerator {
private static Entity addGenericBloodPressureSample(Schema schema, Entity user, Entity device) {
Entity bloodPressureSample = addEntity(schema, "GenericBloodPressureSample");
addCommonTimeSampleProperties("AbstractBloodPressureSample", bloodPressureSample, user, device);
addBloodPressureProperies(bloodPressureSample);
addBloodPressureProperties(bloodPressureSample);
bloodPressureSample.addIntProperty("userIndex");
bloodPressureSample.addIntProperty("meanArterialPressure");
bloodPressureSample.addIntProperty("pulseRate");
+1 -1
View File
@@ -56,7 +56,7 @@
<uses-permission android:name="nz.eloque.foss_wallet.READ_CARDS"/>
<uses-permission android:name="nz.eloque.foss_wallet.dev.READ_CARDS"/>
<!-- Make sure we don't get the INTERNET permission even when a depencency requires it -->
<!-- Make sure we don't get the INTERNET permission even when a dependency requires it -->
<uses-permission android:name="android.permission.INTERNET" tools:node="remove" />
<!-- Internet Helper -->
@@ -143,7 +143,7 @@ public class DevicesFragment extends Fragment {
}
});
showFabIfNeccessary();
showFabIfNecessary();
/* uncomment to enable fixed-swipe to reveal more actions
@@ -197,7 +197,7 @@ public class DevicesFragment extends Fragment {
startActivity(new Intent(getActivity(), DiscoveryActivityV2.class));
}
private void showFabIfNeccessary() {
private void showFabIfNecessary() {
if (GBApplication.getPrefs().getBoolean("display_add_device_fab", true)) {
fab.show();
} else {
@@ -66,21 +66,21 @@ public class DefaultWorkoutCharts {
final ActivityKind.CycleUnit cycleUnit = ActivityKind.getCycleUnit(activityKind);
final List<WorkoutChart> charts = new LinkedList<>();
final TimestampTranslation tsTranslation = new TimestampTranslation();
final int initalCapacity = activityPoints.size();
final List<Entry> heartRateDataPoints = new ArrayList<>(initalCapacity);
final List<Entry> speedDataPoints = new ArrayList<>(initalCapacity);
final List<Entry> cadenceDataPoints = new ArrayList<>(initalCapacity);
final List<Entry> elevationDataPoints = new ArrayList<>(initalCapacity);
final List<Entry> powerDataPoints = new ArrayList<>(initalCapacity);
final List<Entry> respiratoryRatePoints = new ArrayList<>(initalCapacity);
final List<Entry> temperatureDataPoints = new ArrayList<>(initalCapacity);
final List<Entry> depthDataPoints = new ArrayList<>(initalCapacity);
final List<Entry> distancePoints = new ArrayList<>(initalCapacity);
final List<Entry> staminaPoints = new ArrayList<>(initalCapacity);
final List<Entry> bodyEnergyPoints = new ArrayList<>(initalCapacity);
final List<Entry> stepLengthPoints = new ArrayList<>(initalCapacity);
final List<Entry> n2LoadPoints = new ArrayList<>(initalCapacity);
final List<Entry> cnsToxicityPoints = new ArrayList<>(initalCapacity);
final int initialCapacity = activityPoints.size();
final List<Entry> heartRateDataPoints = new ArrayList<>(initialCapacity);
final List<Entry> speedDataPoints = new ArrayList<>(initialCapacity);
final List<Entry> cadenceDataPoints = new ArrayList<>(initialCapacity);
final List<Entry> elevationDataPoints = new ArrayList<>(initialCapacity);
final List<Entry> powerDataPoints = new ArrayList<>(initialCapacity);
final List<Entry> respiratoryRatePoints = new ArrayList<>(initialCapacity);
final List<Entry> temperatureDataPoints = new ArrayList<>(initialCapacity);
final List<Entry> depthDataPoints = new ArrayList<>(initialCapacity);
final List<Entry> distancePoints = new ArrayList<>(initialCapacity);
final List<Entry> staminaPoints = new ArrayList<>(initialCapacity);
final List<Entry> bodyEnergyPoints = new ArrayList<>(initialCapacity);
final List<Entry> stepLengthPoints = new ArrayList<>(initialCapacity);
final List<Entry> n2LoadPoints = new ArrayList<>(initialCapacity);
final List<Entry> cnsToxicityPoints = new ArrayList<>(initialCapacity);
// some activities / devices provide all points with zero values
boolean hasSpeedValues = false;
@@ -471,7 +471,7 @@ public class DBHelper {
}
@NonNull
public static List<ActivityDescription> findActivityDecriptions(@NonNull User user, int tsFrom, int tsTo, @NonNull DaoSession session) {
public static List<ActivityDescription> findActivityDescriptions(@NonNull User user, int tsFrom, int tsTo, @NonNull DaoSession session) {
Property tsFromProperty = ActivityDescriptionDao.Properties.TimestampFrom;
Property tsToProperty = ActivityDescriptionDao.Properties.TimestampTo;
Property userIdProperty = ActivityDescriptionDao.Properties.UserId;
@@ -35,13 +35,13 @@ public class GadgetbridgeUpdate_35 implements DBUpdateScript {
"PRIMARY KEY (\"TIMESTAMP\" ,\"DEVICE_ID\" ,\"BATTERY_INDEX\" ) ON CONFLICT REPLACE) WITHOUT ROWID;";
db.execSQL(CREATE_TABLE);
String MIGATE_DATA = "insert into " + BatteryLevelDao.TABLENAME
String MIGRATE_DATA = "insert into " + BatteryLevelDao.TABLENAME
+ " (" + BatteryLevelDao.Properties.Timestamp.columnName + ","
+ BatteryLevelDao.Properties.DeviceId.columnName + ","
+ BatteryLevelDao.Properties.BatteryIndex.columnName + ","
+ BatteryLevelDao.Properties.Level.columnName + ") "
+ " select Timestamp, Device_ID, 0, Level from battery_levels_temp;";
db.execSQL(MIGATE_DATA);
db.execSQL(MIGRATE_DATA);
String DROP_TEMP_TABLE = "drop table if exists battery_levels_temp";
db.execSQL(DROP_TEMP_TABLE);
@@ -40,7 +40,7 @@ public class GadgetbridgeUpdate_83 implements DBUpdateScript {
"PRIMARY KEY (\""+HuaweiWorkoutPaceSampleDao.Properties.WorkoutId.columnName+"\" ,\""+ HuaweiWorkoutPaceSampleDao.Properties.PaceIndex.columnName +"\" ,\""+ HuaweiWorkoutPaceSampleDao.Properties.Distance.columnName +"\", \""+ HuaweiWorkoutPaceSampleDao.Properties.Type.columnName +"\") ON CONFLICT REPLACE) WITHOUT ROWID;";
db.execSQL(CREATE_TABLE);
String MIGATE_DATA = "INSERT INTO " + HuaweiWorkoutPaceSampleDao.TABLENAME
String MIGRATE_DATA = "INSERT INTO " + HuaweiWorkoutPaceSampleDao.TABLENAME
+ " (" +HuaweiWorkoutPaceSampleDao.Properties.WorkoutId.columnName+ ","
+ HuaweiWorkoutPaceSampleDao.Properties.PaceIndex.columnName + ","
+ HuaweiWorkoutPaceSampleDao.Properties.Distance.columnName+ ","
@@ -50,7 +50,7 @@ public class GadgetbridgeUpdate_83 implements DBUpdateScript {
+ HuaweiWorkoutPaceSampleDao.Properties.Correction.columnName + ") "
+ " SELECT WORKOUT_ID, -1, DISTANCE, TYPE, PACE, 0, CORRECTION FROM " +HuaweiWorkoutPaceSampleDao.TABLENAME + "_temp;";
db.execSQL(MIGATE_DATA);
db.execSQL(MIGRATE_DATA);
String DROP_TEMP_TABLE = "drop table if exists " +HuaweiWorkoutPaceSampleDao.TABLENAME + "_temp;";
db.execSQL(DROP_TEMP_TABLE);
@@ -61,7 +61,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.GB;
* access to the device specific samples. There are both read and write operations.
* @param <T> the sample type
*/
public abstract class AbstractSampleProvider<T extends AbstractActivitySample> implements SampleProvider<T>, PersistanceProvider<T> {
public abstract class AbstractSampleProvider<T extends AbstractActivitySample> implements SampleProvider<T>, PersistenceProvider<T> {
private static final Logger LOG = LoggerFactory.getLogger(AbstractSampleProvider.class);
private static final WhereCondition[] NO_CONDITIONS = new WhereCondition[0];
@@ -49,7 +49,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.GB;
*
* @param <T> the sample type
*/
public abstract class AbstractTimeSampleProvider<T extends AbstractTimeSample> implements TimeSampleProvider<T>, PersistanceProvider<T> {
public abstract class AbstractTimeSampleProvider<T extends AbstractTimeSample> implements TimeSampleProvider<T>, PersistenceProvider<T> {
private static final Logger LOG = LoggerFactory.getLogger(AbstractTimeSampleProvider.class);
private final DaoSession mSession;
@@ -29,7 +29,7 @@ import org.slf4j.Logger
import org.slf4j.LoggerFactory
class BaseActivitySummaryProvider(val device: GBDevice, val session: DaoSession) :
PersistanceProvider<BaseActivitySummary> {
PersistenceProvider<BaseActivitySummary> {
override fun persistSamples(
samples: List<BaseActivitySummary>, context: Context?
): Boolean {
@@ -29,7 +29,7 @@ import org.slf4j.Logger
import org.slf4j.LoggerFactory
class BatteryLevelProvider(val device: GBDevice, val session: DaoSession) :
PersistanceProvider<BatteryLevel> {
PersistenceProvider<BatteryLevel> {
override fun persistSamples(
samples: List<BatteryLevel>, context: Context?
@@ -24,7 +24,7 @@ import androidx.annotation.Nullable;
import java.util.Collections;
import java.util.List;
public interface PersistanceProvider<T> {
public interface PersistenceProvider<T> {
/// Set the relevant metadata for all samples like device ID, user ID, etc. and then
/// stores them all in the database. Existing samples with identical primary key
/// already stored in the database will be replaced.
@@ -158,7 +158,7 @@ public class CMWeatherReceiver extends BroadcastReceiver implements CMWeatherMan
}
weatherSpec.setWindDirection((int) weatherInfo.getWindDirection());
weatherSpec.setCurrentConditionCode(WeatherMapper.mapToOpenWeatherMapCondition(CMtoYahooCondintion(weatherInfo.getConditionCode())));
weatherSpec.setCurrentConditionCode(WeatherMapper.mapToOpenWeatherMapCondition(CMtoYahooCondition(weatherInfo.getConditionCode())));
weatherSpec.setCurrentCondition(WeatherMapper.getConditionString(mContext, weatherSpec.getCurrentConditionCode()));
weatherSpec.setCurrentHumidity((int) weatherInfo.getHumidity());
@@ -174,7 +174,7 @@ public class CMWeatherReceiver extends BroadcastReceiver implements CMWeatherMan
gbForecast.setMaxTemp((int) cmForecast.getHigh() + 273);
gbForecast.setMinTemp((int) cmForecast.getLow() + 273);
}
gbForecast.setConditionCode(WeatherMapper.mapToOpenWeatherMapCondition(CMtoYahooCondintion(cmForecast.getConditionCode())));
gbForecast.setConditionCode(WeatherMapper.mapToOpenWeatherMapCondition(CMtoYahooCondition(cmForecast.getConditionCode())));
weatherSpec.getForecasts().add(gbForecast);
}
ArrayList<WeatherSpec> weatherSpecs = new ArrayList<>(Collections.singletonList(weatherSpec));
@@ -189,7 +189,7 @@ public class CMWeatherReceiver extends BroadcastReceiver implements CMWeatherMan
* @param cmCondition
* @return
*/
private int CMtoYahooCondintion(int cmCondition) {
private int CMtoYahooCondition(int cmCondition) {
int yahooCondition;
if (cmCondition <= SHOWERS) {
yahooCondition = cmCondition;
@@ -92,9 +92,9 @@ public class OsmandEventReceiver {
@Override
public void onVoiceRouterNotify(OnVoiceNavigationParams params) {
List<String> played = params.getPlayed();
for (String instuction : played) {
navigationInfoSpec.instruction = instuction;
LOG.debug("instruction: {}", instuction);
for (String instruction : played) {
navigationInfoSpec.instruction = instruction;
LOG.debug("instruction: {}", instruction);
// only first one for now
break;
}
@@ -272,7 +272,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
private AlarmClockReceiver mAlarmClockReceiver = null;
private SilentModeReceiver mSilentModeReceiver = null;
private GBAutoFetchReceiver mGBAutoFetchReceiver = null;
private AutoConnectIntervalReceiver mAutoConnectInvervalReceiver = null;
private AutoConnectIntervalReceiver mAutoConnectIntervalReceiver = null;
private VolumeChangeReceiver mVolumeChangeReceiver = null;
private HrvCacheInvalidationReceiver mHrvCacheInvalidationReceiver = null;
@@ -532,8 +532,8 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
mBlueToothConnectReceiver = new BluetoothConnectReceiver(this);
ContextCompat.registerReceiver(this, mBlueToothConnectReceiver, new IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED), ContextCompat.RECEIVER_EXPORTED);
mAutoConnectInvervalReceiver= new AutoConnectIntervalReceiver(this);
ContextCompat.registerReceiver(this, mAutoConnectInvervalReceiver, new IntentFilter("GB_RECONNECT"), ContextCompat.RECEIVER_EXPORTED);
mAutoConnectIntervalReceiver = new AutoConnectIntervalReceiver(this);
ContextCompat.registerReceiver(this, mAutoConnectIntervalReceiver, new IntentFilter("GB_RECONNECT"), ContextCompat.RECEIVER_EXPORTED);
IntentFilter bluetoothCommandFilter = new IntentFilter();
bluetoothCommandFilter.addAction(API_LEGACY_COMMAND_BLUETOOTH_CONNECT);
@@ -1629,9 +1629,9 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
unregisterReceiver(mBlueToothConnectReceiver);
mBlueToothConnectReceiver = null;
unregisterReceiver(mAutoConnectInvervalReceiver);
mAutoConnectInvervalReceiver.destroy();
mAutoConnectInvervalReceiver = null;
unregisterReceiver(mAutoConnectIntervalReceiver);
mAutoConnectIntervalReceiver.destroy();
mAutoConnectIntervalReceiver = null;
for(GBDevice device : getGBDevices()){
try {
@@ -23,7 +23,7 @@ public enum Command {
EnableNewIncomingAlertNotification(0),
EnableUnreadCategoryStatusNotification(1),
DisableNewIncomingAlertNotification(2),
DisbleUnreadCategoryStatusNotification(3),
DisableUnreadCategoryStatusNotification(3),
NotifyNewIncomingAlertImmediately(4),
NotifyUnreadCategoryStatusImmediately(5),;
// 6-255 reserved for future use
@@ -61,7 +61,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.GarminSpo2SampleProvider;
import nodomain.freeyourgadget.gadgetbridge.devices.GarminStressSampleProvider;
import nodomain.freeyourgadget.gadgetbridge.devices.GenericTrainingLoadAcuteSampleProvider;
import nodomain.freeyourgadget.gadgetbridge.devices.GenericTrainingLoadChronicSampleProvider;
import nodomain.freeyourgadget.gadgetbridge.devices.PersistanceProvider;
import nodomain.freeyourgadget.gadgetbridge.devices.PersistenceProvider;
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminActivitySampleProvider;
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminEventSampleProvider;
import nodomain.freeyourgadget.gadgetbridge.devices.garmin.GarminWorkoutParser;
@@ -947,7 +947,7 @@ public class FitImporter {
}
private <T> void persistAbstractSamples(@NonNull final List<T> samples,
@NonNull final PersistanceProvider<T> sampleProvider) {
@NonNull final PersistenceProvider<T> sampleProvider) {
sampleProvider.persistSamples(samples, context);
}
@@ -126,11 +126,11 @@ public class GB {
NotificationManager.IMPORTANCE_LOW);
notificationManager.createNotificationChannel(channelGeneral);
NotificationChannel channelConnwectionStatus = new NotificationChannel(
NotificationChannel channelConnectionStatus = new NotificationChannel(
NOTIFICATION_CHANNEL_ID_CONNECTION_STATUS,
context.getString(R.string.notification_channel_connection_status_name),
NotificationManager.IMPORTANCE_LOW);
notificationManager.createNotificationChannel(channelConnwectionStatus);
notificationManager.createNotificationChannel(channelConnectionStatus);
NotificationChannel channelScanService = new NotificationChannel(
NOTIFICATION_CHANNEL_ID_SCAN_SERVICE,
@@ -267,13 +267,13 @@ public class GB {
}else{
StringBuilder contentText = new StringBuilder();
boolean isConnected = true;
boolean anyDeviceSupportesActivityDataFetching = false;
boolean anyDeviceSupportsActivityDataFetching = false;
for(GBDevice device : devices){
if(!device.isInitialized()){
isConnected = false;
}
anyDeviceSupportesActivityDataFetching |= device.getDeviceCoordinator().supportsDataFetching(device);
anyDeviceSupportsActivityDataFetching |= device.getDeviceCoordinator().supportsDataFetching(device);
String deviceName = device.getAliasOrName();
String text = device.getStateString(context);
@@ -299,7 +299,7 @@ public class GB {
builder.setColor(ContextCompat.getColor(context, R.color.accent));
}
if (anyDeviceSupportesActivityDataFetching) {
if (anyDeviceSupportsActivityDataFetching) {
Intent deviceCommunicationServiceIntent = new Intent(context, DeviceCommunicationService.class);
deviceCommunicationServiceIntent.setPackage(BuildConfig.APPLICATION_ID);
deviceCommunicationServiceIntent.setAction(DeviceService.ACTION_FETCH_RECORDED_DATA);
@@ -60,7 +60,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.language.impl.RussianTransliter
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.ScandinavianTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.SerbianTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.TurkishTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.UkranianTransliterator;
import nodomain.freeyourgadget.gadgetbridge.util.language.impl.UkrainianTransliterator;
public class LanguageUtils {
private static final Logger LOG = LoggerFactory.getLogger(LanguageUtils.class);
@@ -90,7 +90,7 @@ public class LanguageUtils {
put("scandinavian", new ScandinavianTransliterator());
put("serbian", new SerbianTransliterator());
put("turkish", new TurkishTransliterator());
put("ukranian", new UkranianTransliterator());
put("ukranian", new UkrainianTransliterator());
put("armenian", new ArmenianTransliterator());
}};
@@ -37,7 +37,7 @@ public class ArmenianTransliterator implements Transliterator {
private static final Map<String, String> transliterateMap = new LinkedHashMap<String, String>() {
{
// Simple substitutions
Map<String, String> simpleSubstitions = new HashMap<String, String>() {
Map<String, String> simpleSubstitutions = new HashMap<String, String>() {
{
put("ա","a");
put("բ","b");
@@ -85,10 +85,10 @@ public class ArmenianTransliterator implements Transliterator {
};
// Capitalize existing simple substitutions here
for (final Entry<String, String> entry : new ArrayList<Entry<String, String>>(simpleSubstitions.entrySet())) {
for (final Entry<String, String> entry : new ArrayList<Entry<String, String>>(simpleSubstitutions.entrySet())) {
String capitalKey = entry.getKey().toUpperCase();
if (!capitalKey.equals(entry.getKey())) {
simpleSubstitions.put(capitalKey, entry.getValue().toUpperCase());
simpleSubstitutions.put(capitalKey, entry.getValue().toUpperCase());
}
}
@@ -136,8 +136,8 @@ public class ArmenianTransliterator implements Transliterator {
for (final String letter : letterMapU) {
final String capitalLetter = letter.toUpperCase();
final String transliteratedLetter = Objects.requireNonNull(simpleSubstitions.get(letter), letter);
final String transliteratedCapitalLetter = Objects.requireNonNull(simpleSubstitions.get(capitalLetter), capitalLetter);
final String transliteratedLetter = Objects.requireNonNull(simpleSubstitutions.get(letter), letter);
final String transliteratedCapitalLetter = Objects.requireNonNull(simpleSubstitutions.get(capitalLetter), capitalLetter);
put(letter + "ու", transliteratedLetter + "u");
put(capitalLetter + "ու", transliteratedCapitalLetter + "u");
@@ -194,8 +194,8 @@ public class ArmenianTransliterator implements Transliterator {
for (String letter : letterMapVo) {
String capitalLetter = letter.toUpperCase();
final String transliteratedLetter = Objects.requireNonNull(simpleSubstitions.get(letter));
final String transliteratedCapitalLetter = Objects.requireNonNull(simpleSubstitions.get(capitalLetter));
final String transliteratedLetter = Objects.requireNonNull(simpleSubstitutions.get(letter));
final String transliteratedCapitalLetter = Objects.requireNonNull(simpleSubstitutions.get(capitalLetter));
put(letter + "ո", transliteratedLetter + "o");
put(capitalLetter + "ո", transliteratedCapitalLetter + "o");
@@ -220,7 +220,7 @@ public class ArmenianTransliterator implements Transliterator {
put("Ւ","");
// Simple substitutions have last priority
for (final Map.Entry<String,String> entry : simpleSubstitions.entrySet()) {
for (final Map.Entry<String,String> entry : simpleSubstitutions.entrySet()) {
put(entry.getKey(), entry.getValue());
put(entry.getKey().toUpperCase(), entry.getValue().toUpperCase());
}
@@ -20,8 +20,8 @@ import java.util.HashMap;
import nodomain.freeyourgadget.gadgetbridge.util.language.SimpleTransliterator;
public class UkranianTransliterator extends SimpleTransliterator {
public UkranianTransliterator() {
public class UkrainianTransliterator extends SimpleTransliterator {
public UkrainianTransliterator() {
super(new HashMap<Character, String>() {{
put('ґ', "gh"); put('є', "je"); put('і', "i"); put('ї', "ji"); put('Ґ', "GH"); put('Є', "JE"); put('І', "I"); put('Ї', "JI");
}});
+8 -8
View File
@@ -136,7 +136,7 @@
<change>Huawei/Honor: Fix workout processing for some devices</change>
<change>Mi Band 9 Active: Fix activity fetching</change>
<change>Pebble: Fix app configuration when internet helper is available but disallowed</change>
<change>Pebble: Fix crash when returning from exernal website from browser application</change>
<change>Pebble: Fix crash when returning from external website from browser application</change>
<change>Pebble: Fix sending config to watchfaces</change>
<change>Sony WF-1000XM4: Enable speak-to-chat support</change>
<change>Webview: Do not check firewall when direct internet access is available</change>
@@ -274,7 +274,7 @@
<change>Coospo HW807: Fix device discovery</change>
<change>Even Realities G1: Fix support for some BLE names</change>
<change>Even Realities G1: Improve connection reliability</change>
<change>Even Realities G1: Support non-latin charaters in notifications</change>
<change>Even Realities G1: Support non-latin characters in notifications</change>
<change>Garmin: Add debug support to fetch DEVICE_XML</change>
<change>Garmin: Add respiratory rate chart</change>
<change>Garmin: Add temperature / diving depth charts</change>
@@ -309,7 +309,7 @@
<change>Pebble: Support multiple weather location with system weather app (on fw 4.x)</change>
<change>Pebble: Support night icons on TrekVolle and TimeStyle</change>
<change>Pebble 2/2 Duo: Fix random crashes on disconnect</change>
<change>Pebble 2 Duo: Support getting inital battery level</change>
<change>Pebble 2 Duo: Support getting initial battery level</change>
<change>Pebble: support night weather icons in TrekVolle watch face</change>
<change>Sony Wena 3: Enable body energy</change>
<change>Withings Steel HR: Improve initialization reliability</change>
@@ -423,7 +423,7 @@
<change>Charts: Add additional sleep chart with sleep stages</change>
<change>Charts: Add sleep charts overlays (hr, spo2, temperature, respiratory rate)</change>
<change>Charts: Add training load</change>
<change>Charts: Compute time weighted avarage for heart rate</change>
<change>Charts: Compute time weighted average for heart rate</change>
<change>Charts: Fix crash if database fetch fails</change>
<change>Charts: Improve values text contrast</change>
<change>Charts: Rework blood oxygen chart</change>
@@ -607,7 +607,7 @@
<change>Charts: Restore steps balance on weekly and monthly charts</change>
<change>Colmi R09: Add preference to toggle temperature measurements</change>
<change>Colmi R09: Fix temperature data parsing</change>
<change>Colmi R0x: Add support for realtime heart rate meassurements and live activity tracking</change>
<change>Colmi R0x: Add support for realtime heart rate measurements and live activity tracking</change>
<change>Garmin: Add basic fit file viewer</change>
<change>Garmin: Add custom notification actions</change>
<change>Garmin: Allow fake OAuth</change>
@@ -958,7 +958,7 @@
<change>Bangle.js: Set filename on save file dialogs</change>
<change>Bangle.js: Improve communication stability</change>
<change>Bangle.js: Sync activity tracks</change>
<change>Bangle.js: remove unwanted charaters from calendar events</change>
<change>Bangle.js: remove unwanted characters from calendar events</change>
<change>Femometer Vinca II: Add temperature charts</change>
<change>Fossil/Skagen Hybrids: Remove activity fetching toasts and add finished signal</change>
<change>Fossil/Skagen Hybrids: Use steps instead of calories for activity intensity</change>
@@ -1197,7 +1197,7 @@
<change>Bangle.js: Send last received activity timestamp on connect (to allow sync of activity samples)</change>
<change>Bangle.js: Allow connecting HW keyboard without closing app loader</change>
<change>Bangle.js: Bump flavor target SDK version to 31</change>
<change>Bangle.js: Fix convertion of emoji/unicode to bitmap without width/height</change>
<change>Bangle.js: Fix conversion of emoji/unicode to bitmap without width/height</change>
<change>Bangle.js: Fix location listener not being cleaned up when waiting for reconnect</change>
<change>Bangle.js: Fix memory leak from HTTP requests</change>
<change>Bangle.js: Fix orientation changes closing app loader</change>
@@ -1346,7 +1346,7 @@
<change>Huami: Implement proper find device</change>
<change>Huami: Change default find band vibration pattern</change>
<change>Flipper Zero: added duration to Intent API</change>
<change>Flipper Zero: fixed crash due to unregistered boradcast receiver</change>
<change>Flipper Zero: fixed crash due to unregistered broadcast receiver</change>
<change>Flipper Zero: fetch firmware version from flipper</change>
<change>Fossil Hybrid HR: Correctly initialize watchface after reset or crash</change>
<change>Fossil Hybrid HR: Set OpenTracks track category and icon to workout type selected on watch</change>
@@ -102,7 +102,7 @@ public class EntitiesTest extends TestBase {
ActivityDescriptionDao descDao = daoSession.getActivityDescriptionDao();
assertEquals(0, descDao.count());
List<ActivityDescription> list = DBHelper.findActivityDecriptions(user, 10, 100, daoSession);
List<ActivityDescription> list = DBHelper.findActivityDescriptions(user, 10, 100, daoSession);
assertTrue(list.isEmpty());
ActivityDescription desc = DBHelper.createActivityDescription(user, 10, 100, daoSession);
@@ -119,59 +119,59 @@ public class EntitiesTest extends TestBase {
t1.setDescription("Table tennis training for Olympia");
tagList.add(t1);
list = DBHelper.findActivityDecriptions(user, 10, 100, daoSession);
list = DBHelper.findActivityDescriptions(user, 10, 100, daoSession);
assertEquals(1, list.size());
ActivityDescription desc1 = list.get(0);
assertEquals(desc, desc1);
assertEquals(1, desc1.getTagList().size());
// check for partial range overlaps
list = DBHelper.findActivityDecriptions(user, 20, 80, daoSession);
list = DBHelper.findActivityDescriptions(user, 20, 80, daoSession);
assertEquals(1, list.size());
list = DBHelper.findActivityDecriptions(user, 5, 120, daoSession);
list = DBHelper.findActivityDescriptions(user, 5, 120, daoSession);
assertEquals(1, list.size());
list = DBHelper.findActivityDecriptions(user, 20, 120, daoSession);
list = DBHelper.findActivityDescriptions(user, 20, 120, daoSession);
assertEquals(1, list.size());
list = DBHelper.findActivityDecriptions(user, 5, 80, daoSession);
list = DBHelper.findActivityDescriptions(user, 5, 80, daoSession);
assertEquals(1, list.size());
// Now with a second, adjacent ActivityDescription
ActivityDescription desc2 = DBHelper.createActivityDescription(user, 101, 200, daoSession);
list = DBHelper.findActivityDecriptions(user, 10, 100, daoSession);
list = DBHelper.findActivityDescriptions(user, 10, 100, daoSession);
assertEquals(1, list.size());
list = DBHelper.findActivityDecriptions(user, 20, 80, daoSession);
list = DBHelper.findActivityDescriptions(user, 20, 80, daoSession);
assertEquals(1, list.size());
list = DBHelper.findActivityDecriptions(user, 5, 120, daoSession);
list = DBHelper.findActivityDescriptions(user, 5, 120, daoSession);
assertEquals(2, list.size());
list = DBHelper.findActivityDecriptions(user, 20, 120, daoSession);
list = DBHelper.findActivityDescriptions(user, 20, 120, daoSession);
assertEquals(2, list.size());
list = DBHelper.findActivityDecriptions(user, 5, 80, daoSession);
list = DBHelper.findActivityDescriptions(user, 5, 80, daoSession);
assertEquals(1, list.size());
// Now with a third, partially overlapping ActivityDescription
ActivityDescription desc3 = DBHelper.createActivityDescription(user, 5, 15, daoSession);
list = DBHelper.findActivityDecriptions(user, 10, 100, daoSession);
list = DBHelper.findActivityDescriptions(user, 10, 100, daoSession);
assertEquals(2, list.size());
list = DBHelper.findActivityDecriptions(user, 20, 80, daoSession);
list = DBHelper.findActivityDescriptions(user, 20, 80, daoSession);
assertEquals(1, list.size());
list = DBHelper.findActivityDecriptions(user, 5, 120, daoSession);
list = DBHelper.findActivityDescriptions(user, 5, 120, daoSession);
assertEquals(3, list.size());
list = DBHelper.findActivityDecriptions(user, 20, 120, daoSession);
list = DBHelper.findActivityDescriptions(user, 20, 120, daoSession);
assertEquals(2, list.size());
list = DBHelper.findActivityDecriptions(user, 5, 80, daoSession);
list = DBHelper.findActivityDescriptions(user, 5, 80, daoSession);
assertEquals(2, list.size());
}
@@ -39,7 +39,7 @@ public class MessageBuilderTest {
}
@Test
public void testUnresolveableMessage() {
public void testUnresolvableMessage() {
// arrange
byte[] data = GB.hexStringToByteArray("143fbcce");
when(messageFactoryMock.createMessageFromRawData(data)).thenReturn(null);