forked from Elara6331/itd
Compare commits
1 Commits
romanian
...
translit-m
| Author | SHA1 | Date | |
|---|---|---|---|
| 49240c47f3 |
@@ -60,7 +60,6 @@ Since the PineTime does not have enough space to store all unicode glyphs, it on
|
||||
- Armenian
|
||||
- Korean
|
||||
- Chinese
|
||||
- Romanian
|
||||
- Emoji
|
||||
|
||||
Place the desired map names in an array as `notifs.translit.use`. They will be evaluated in order. You can also put custom transliterations in `notifs.translit.custom`. These take priority over any other maps. The `notifs.translit` config section should look like this:
|
||||
|
||||
9
music.go
9
music.go
@@ -22,10 +22,13 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"go.arsenm.dev/infinitime"
|
||||
"go.arsenm.dev/infinitime/pkg/player"
|
||||
"go.arsenm.dev/itd/translit"
|
||||
)
|
||||
|
||||
func initMusicCtrl(dev *infinitime.Device) error {
|
||||
player.Init()
|
||||
maps := k.Strings("notifs.translit.use")
|
||||
translit.Transliterators["custom"] = translit.Map(k.Strings("notifs.translit.custom"))
|
||||
|
||||
player.OnChange(func(ct player.ChangeType, val string) {
|
||||
if !firmwareUpdating {
|
||||
@@ -33,11 +36,11 @@ func initMusicCtrl(dev *infinitime.Device) error {
|
||||
case player.ChangeTypeStatus:
|
||||
dev.Music.SetStatus(val == "Playing")
|
||||
case player.ChangeTypeTitle:
|
||||
dev.Music.SetTrack(val)
|
||||
dev.Music.SetTrack(translit.Transliterate(val, maps...))
|
||||
case player.ChangeTypeAlbum:
|
||||
dev.Music.SetAlbum(val)
|
||||
dev.Music.SetAlbum(translit.Transliterate(val, maps...))
|
||||
case player.ChangeTypeArtist:
|
||||
dev.Music.SetArtist(val)
|
||||
dev.Music.SetArtist(translit.Transliterate(val, maps...))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -327,24 +327,6 @@ var Transliterators = map[string]Transliterator{
|
||||
"ÿ", "y",
|
||||
"ç", "c",
|
||||
},
|
||||
"Romanian": Map{
|
||||
"ă", "a",
|
||||
"Ă", "A",
|
||||
"â", "a",
|
||||
"Â", "A",
|
||||
"î", "i",
|
||||
"Î", "I",
|
||||
"ș", "s",
|
||||
"Ș", "S",
|
||||
"ț", "t",
|
||||
"Ț", "T",
|
||||
"ş", "s",
|
||||
"Ş", "S",
|
||||
"ţ", "t",
|
||||
"Ţ", "T",
|
||||
"„", "\"",
|
||||
"”", "\"",
|
||||
},
|
||||
"Emoji": Map{
|
||||
"😂", ":')",
|
||||
"😊", ":)",
|
||||
|
||||
Reference in New Issue
Block a user