mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-15 12:17:33 +01:00
Merge pull request #1254 from roigreenberg/master
Rtl support: Add missing Persian letters + fix bug
This commit is contained in:
commit
9612ce209f
@ -177,6 +177,13 @@ public class RtlUtils {
|
|||||||
put((char)('ل' + 'أ'), '\uFEF7');
|
put((char)('ل' + 'أ'), '\uFEF7');
|
||||||
put((char)('ل' + 'إ'), '\uFEF9');
|
put((char)('ل' + 'إ'), '\uFEF9');
|
||||||
put((char)('ل' + 'ا'), '\uFEFB');
|
put((char)('ل' + 'ا'), '\uFEFB');
|
||||||
|
//Farsi
|
||||||
|
put('گ', '\uFB92');
|
||||||
|
put('ک', '\uFB8E');
|
||||||
|
put('چ', '\uFB7A');
|
||||||
|
put('پ', '\uFB56');
|
||||||
|
put('ژ', '\uFB8A');
|
||||||
|
put('ی', '\uFBFC');
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -207,6 +214,12 @@ public class RtlUtils {
|
|||||||
put('ه', '\uFEEB');
|
put('ه', '\uFEEB');
|
||||||
put('ي', '\uFEF3');
|
put('ي', '\uFEF3');
|
||||||
put('ئ', '\uFE8B');
|
put('ئ', '\uFE8B');
|
||||||
|
//Farsi
|
||||||
|
put('گ', '\uFB94');
|
||||||
|
put('ک', '\uFB90');
|
||||||
|
put('چ', '\uFB7C');
|
||||||
|
put('پ', '\uFB58');
|
||||||
|
put('ی', '\uFBFE');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -236,6 +249,12 @@ public class RtlUtils {
|
|||||||
put('ه', '\uFEEC');
|
put('ه', '\uFEEC');
|
||||||
put('ي', '\uFEF4');
|
put('ي', '\uFEF4');
|
||||||
put('ئ', '\uFE8C');
|
put('ئ', '\uFE8C');
|
||||||
|
//Farsi
|
||||||
|
put('گ', '\uFB95');
|
||||||
|
put('ک', '\uFB91');
|
||||||
|
put('چ', '\uFB7D');
|
||||||
|
put('پ', '\uFB59');
|
||||||
|
put('ی', '\uFBFF');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -281,6 +300,13 @@ public class RtlUtils {
|
|||||||
put((char)('ل' + 'أ'), '\uFEF8');
|
put((char)('ل' + 'أ'), '\uFEF8');
|
||||||
put((char)('ل' + 'إ'), '\uFEFA');
|
put((char)('ل' + 'إ'), '\uFEFA');
|
||||||
put((char)('ل' + 'ا'), '\uFEFC');
|
put((char)('ل' + 'ا'), '\uFEFC');
|
||||||
|
//Farsi
|
||||||
|
put('گ', '\uFB93');
|
||||||
|
put('ک', '\uFB8F');
|
||||||
|
put('چ', '\uFB7B');
|
||||||
|
put('پ', '\uFB57');
|
||||||
|
put('ژ', '\uFB8B');
|
||||||
|
put('ی', '\uFBFD');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
public enum contextualState{
|
public enum contextualState{
|
||||||
@ -502,7 +528,8 @@ public class RtlUtils {
|
|||||||
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (line.length() + phrase.length() + word.length() < line_max_size) {
|
if ((line.length() + phrase.length() + word.length() < line_max_size) ||
|
||||||
|
(line.length() == 0 && word.length() > line_max_size)) {
|
||||||
if (isSpaceSign(c)) {
|
if (isSpaceSign(c)) {
|
||||||
word.append(c);
|
word.append(c);
|
||||||
addCharToWord = true;
|
addCharToWord = true;
|
||||||
|
@ -14,6 +14,7 @@ import nodomain.freeyourgadget.gadgetbridge.GBException;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.test.TestBase;
|
import nodomain.freeyourgadget.gadgetbridge.test.TestBase;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
|
||||||
|
|
||||||
import static nodomain.freeyourgadget.gadgetbridge.model.DeviceService.EXTRA_NOTIFICATION_BODY;
|
import static nodomain.freeyourgadget.gadgetbridge.model.DeviceService.EXTRA_NOTIFICATION_BODY;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user