Notification language #7006
Replies: 1 comment
-
Posted at 2024-03-13 by @gfwilliams Hi! I'm afraid at the moment displaying Korean from iPhone messages doesn't work - for Android we have Gadgetbridge running on the phone which can render the Korean characters on the phone and send them over, but for iOS, Apple sends the notification text direct to the watch (without any app involvement) so we would have to have every Korean character stored on the watch. However, there has been some work done on this already. Recent Bangle.js firmwares have the ability to handle Unicode and to render those characters from a font file. I've attached a file which contains over 50,000 characters (it's 2 megabytes, so uses about a quarter of your Bangle's flash!) When you get your bangle and write code for it, you should be able to upload the font (which takes a while) and do:
And it'll display the korean text on-device. So then in theory in the It's a shame it hasn't been all built in yet, but honestly there just hasn't been the demand for it, so it hasn't taken priority over all the other stuff that's being requested! Attachments: Posted at 2024-03-13 by JeonLab @gfwilliams, thanks a lot for the detailed answers and solutions. 2Mbytes is too big for Bangle's memory just for the fonts. I'll check out the UTF-8 conversion, which seems like the way to go. I'm really excited for the Bangle to arrive! Cheers! Posted at 2024-03-13 by @gfwilliams The Bangle does have 8MB so 2 isn't the end of the world, but that does contain almost every character you should need for any language. As far as I could tell there are 3 distinct areas of characters needed for Korean, so it would be possible to create a font that contained just those and would be substantially smaller (maybe 0.5mb?) The hope was that we'd actually have different apps for different sets of fonts, and then you could install those, and the messages app would just use whatever one was installed. Posted at 2024-03-13 by JeonLab Is there a software to modify the file, font.pbf to create a particular language set? Posted at 2024-03-14 by @gfwilliams Yes - the script to create it is: https://github.com/espruino/Espruino/blob/master/libs/graphics/font/fontconverter.js#L607 Right now we only do one full range, but it needs tweaking to be able to include various different ranges for different languages, for example for Korean I think you'd need:
Probably plus the standard ASCII range as well However ideally I'd like to pull the script into https://github.com/espruino/EspruinoWebTools/blob/master/fontconverter.js Posted at 2024-03-14 by JeonLab @gfwilliams, you ARE the best!! Posted at 2024-03-15 by Hank You could also try to reduce the font to the set of characters you really need to reduce the size. There is an open source app called Fontforge which allows you to modify fonts on a very detailed level. Posted at 2024-03-15 by JeonLab @hank, thank you for your suggestion. I will try. Posted at 2024-03-15 by @gfwilliams @hank I'm afraid Bangle.js's fonts are unlikely to be supported by Fontforge but I've got some solutions that do allow you to strip things down now. I've just committed a bunch of code in espruino/BangleApps@591c1f8 which should be in the development app loader now. As a result, @jeonlab if you go to https://espruino.github.io/BangleApps/ and update everything on your Bangle, then install https://espruino.github.io/BangleApps/?id=fontall you should be able to get Korean messages from iOS onto your watch. Same applies for Chinese/Japanese/others too. As-is all the fonts will be small, but if you update the Bangle.js firmware to cutting edge then you should be able to get the font double-sized where it's possible to fit it in. It should be possible to (very easily) clone Posted at 2024-03-15 by JeonLab @gfwilliams, that’s awesome!! Posted at 2024-03-15 by JeonLab @gfwilliams, I got the Bangle and updated the firmware and all the updates for the apps and tried to install the Fonts (all languages), but after it started loading, maybe several seconds later, the browser (Chrome) lost it's connection and the Bangle seems to be frozen with a message that it's uploading. I tried a few times, but no success. On the watch, the BLE and Programmable are enabled. How do I keep its connection for this large file installation? Posted at 2024-03-15 by @thyttan If you clear browser cookies for the App Loader and reload the page, does it work after that? Posted at 2024-03-15 by JeonLab @thyttan, thank you for your reply, but it didn't work. I have cleared browsing data and cookies but it still stops after about 5% on the progressing bar. Posted at 2024-03-15 by @thyttan Two things, do them separately or at the same time. Don't know what's best.
Posted at 2024-03-16 by JeonLab @thyttan, I did those two tests you suggested and got the messages at the end that it was disconnected. After that, I had to restart my laptop for other things and I tried to upload it and it worked. I didn't make any changes, but it worked all of a sudden. I don't understand. @gfwilliams, after installing the Fonts app (2MB), I tested with a short email to myself with a mixed message in English and Korean, but I can only see English. Thanks. Posted at 2024-03-18 by @gfwilliams Did you manage to do the update ok? I guess it's possible there wasn't enough space on the watch storage or something like that? And you definitely uploaded from the Development App loader (so the Message UI app is 0.77 and iOS Integration is 0.17)? Posted at 2024-03-18 by JeonLab @gfwilliams, the update was done without any error, but I did that from the normal App Loader. Where is the Development App Loader? I couldn’t find it. Posted at 2024-03-18 by @gfwilliams Ahh - this one: https://espruino.github.io/BangleApps/ You need the apps at those versions or later, and make sure you hold the button to reload after installing Posted at 2024-03-18 by JeonLab Ohh… that’s what I missed. Update: I just got a chance to try and updated all the apps from the Development App Loader and installed the font, but I still don't see Korean in the messages. Posted at 2024-03-18 by @gfwilliams Please can you try connecting with the Web IDE and pasting in:
and see what happens? And you definitely installed the Posted at 2024-03-18 by JeonLab After pasting the message in the WebIDE and entered, it says "=undefined" Quick update: It still doesn’t show Korean when the message was sent from my iPhone. So I guess it’s the iOS message processing issue. Posted at 2024-03-18 by @gfwilliams Ok, thanks for the info! That would make sense then - I wasn't able to test out the iOS stuff properly because I only have an old iPad and no other apple devices, and I couldn't find a way of getting notifications on it (Hangouts which I had used previously has been deprecated!). Please could you use the
then receive some messages with iOS. Then if you disconnect and reconnect with the Web IDE, click the 'Storage' icon (4 disc icon in the middle bar of the screen), scroll right down, and click to download 'messages.log', and upload it here I can try to take a look and see what's up Posted at 2024-03-18 by JeonLab @gfwilliams, here is the message.log. {"event":"add","uid":4,"category":0,"categoryCnt":2,"silent":false,"important":false,"preExisting":false,"positive":false,"negative":true,"appId":"com.google.calendar","title":"\u00EA\u00B0\u009C\u00EA\u00B5\u00B4","subtitle":"","message":"11:20\u00E2\u0080\u00AFAM","messageSize":"10","date":"20240318T112000","posAction":"","negAction":"Clear","new":true} Posted at 2024-03-19 by JeonLab @gfwilliams, I did some test. After doing your suggested tests above, I sent an email to my gmail with the same title and message in your test pushMessage in the post #21, which is 'Hello World' in Korean, '안녕하세요 세상.' And then I compared the unicode between your test message and received notification sent from my iPhone. Below is the message log after I received the notification. {"event":"add","uid":5,"category":0,"categoryCnt":5,"silent":false,"important":false,"preExisting":false,"positive":false,"negative":true,"appId":"com.google.Gmail","title":"Jeon, Jinseok","subtitle":"\u00EC\u0095\u0088\u00EB\u0085\u0095\u00ED\u0095\u0098\u00EC\u0084\u00B8\u00EC\u009A\u0094 \u00EC\u0084\u00B8\u00EC\u0083\u0081","message":"\u00EC\u0095\u0088\u00EB\u0085\u0095\u00ED\u0095\u0098\u00EC\u0084\u00B8\u00EC\u009A\u0094 \u00EC\u0084\u00B8\u00EC\u0083\u0081","messageSize":"22","date":"20240318T211844","posAction":"","negAction":"Clear","new":true} So, the title (and the message) should be '\uc548\ub155\ud558\uc138\uc694\u0020\uc138\uc0c1' but iPhone sends '\u00EC\u0095\u0088\u00EB\u0085\u0095\u00ED\u0095\u0098\u00EC\u0084\u00B8\u00EC\u009A\u0094 \u00EC\u0084\u00B8\u00EC\u0083\u0081' instead. I checked the unicode for the message '안녕하세요 세상' from the website, https://koreanstudies.com/unicode-converter.html and the unicode in your test code was correct. So, the apps iOS Integration and/or Message UI seem to interpret the unicode incorrectly at least for Korean. Posted at 2024-03-19 by @gfwilliams Ok, that's great - thanks! So I think the iPhone is sending the right UTF8 text - it's formatted as
I just realised I made a stupid mistake - originally I'd named the font library If you update with the dev app loader to iOS 0.18 now it should work! And you might as well remove 'custom boot code' to stop all your messages needing to get stored as well :) Posted at 2024-03-19 by JeonLab @gfwilliams, it works! Posted at 2024-03-19 by @gfwilliams That's great! Thanks for all the testing and reporting back! This isn't just Korean but should have improved the situation for anyone with a non-english Language that wants notifications too Posted at 2024-04-04 by JeonLab @gfwilliams, in your reply in the post #10, you said:
Could you let me know how to run the fontconverter to create a new font file to include only ASCii and Korean? I have some experiences with other languages like Arduino, but I'm very new to JavaScript, so I have no idea where to start. I took a look at the github pages, but still no clue where/how to run. If there is an instruction or guide, please let me know the link. Thanks. Posted at 2024-04-04 by @gfwilliams Ok, basically:
and you're done. But you may need to install Node.js and NPM, run I can't really provide help if you hit issues with that though - after all, literally all it's going to do is save you 0.5-1MB of flash, it won't provide extra functionality Posted at 2024-04-04 by JeonLab @gfwilliams, thank you so much for your help. I know it won't provide any extra functionality but save some flash. I wanted to learn JS and BangleApp development process (I know it will be only a small fraction of it). Posted at 2024-04-04 by JeonLab @gfwilliams, thanks to your instruction, I could successfully reduce the file size. It's now 420kB for Korean and ASCii.
Thanks. Posted at 2024-04-09 by @gfwilliams Great! Thanks for tracking that down - i've just put that change in. It'd be great if you could do a PR for that new font Posted at 2024-04-09 by JeonLab @gfwilliams, I'm not really familiar with Github stuff. I have been using Github only to provide/store some of my programs linked from my blog. Posted at 2024-04-10 by @gfwilliams Yes, I meant pull request - there's a tutorial on it here, showing you how to set up your own personal app loader, and then add an app to it: https://www.espruino.com/Bangle.js+App+Loader You can ignore most of the stuff about metadata as you've already got the app set up - it's just a matter of uploading your files and then making a pull request. You can always try and get it set up in your own personal app loader and then send us the link to try out first Posted at 2024-04-10 by JeonLab @gfwilliams, thank you for your detailed explanation as always. Posted at 2024-04-11 by JeonLab @gfwilliams, could you please review following two apps I have added to my forked repository and let me know if I need to correct anything? I have tested both apps on my Bangle and worked fine. https://jeonlab.github.io/BangleApps/?q=font_korean Posted at 2024-04-15 by @gfwilliams Thanks - yes, this looks good, but it'd be nice if the filename followed the same style as the other font apps like Basically the more similar you can make all the apps (same filenames/etc) the easier it'll be to maintain/compare them for other users.
Posted at 2024-04-15 by JeonLab @gfwilliams, as always, thank you so much for your review and good advice. I will make the changes and open a PR. Is there an easy way to change the filename from One more question: I know this is a question about Github, but couldn't find a good answer from Google. For those two apps I made (copied from others :)) have so many commits while I was testing, adjusting, etc. I wonder if I need to clean up those commits before opening a PR. If so, how do you do that in web browser based Github? Posted at 2024-04-17 by @gfwilliams Thanks - the PR looks great! If you're working with the repository in your PC itself then you can use the Generally I'm not too bothered about having extra commits showing in the repo - but I guess if there are a bunch of single "rename X to Y" commits it's not ideal. I'm not sure if you can do it at your side, but it's just a quick button press when I click merge, so I just did it anyway. Posted at 2024-04-17 by JeonLab Thanks again, Gordon. Posted at 2024-04-17 by @gfwilliams
No, I'm pretty sure you can't - and it doesn't look like there's anything built in for renaming folders (at least at first glance) Posted at 2024-04-18 by @halemmerich You should be able to do all that in a github codespace which is free to use for personal accounts for some time and data limits. But at that point I would probably install a VSCode or similar locally instead. Posted at 2024-04-18 by JeonLab @gfwilliams and @halemmerich, thank you for your replies. Posted at 2024-09-15 by Andrey777 @gfwilliams Hello. In 150+ languages fonts for Ukrainian language there are three lowercase letters missing. It is necessary to change the range from 1103 to 1111. Thank you very much for your work!
Attachments: Posted at 2024-09-16 by @gfwilliams Thanks - I'll update that! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-03-11 by JeonLab
Hey everyone!
I just ordered a Bangle.js 2 and I'm super excited to start using it and creating my own apps. It has everything I need - a transflective LCD (which is the best feature for me), a GPS, 3 axis accelerometer/magnetometer, a pressure/temp sensor, and it's PROGRAMMABLE! I don't have much experience with JS programming, but I can't wait to learn.
While I wait for my watch to arrive, I have a question. I have an iPhone 14 and I want to receive notifications on the watch. Since I'm Korean, I want to see those messages in Korean. Will it work automatically or do I need to install an app (I couldn't find anything in the App Loader page)?
Thanks!
J
Beta Was this translation helpful? Give feedback.
All reactions