Felix Palmen :freebsd: :c64:<p>This is now kind of a dev microblog concerning <a href="https://mastodon.bsd.cafe/tags/Xmoji" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Xmoji</span></a>. I'm kind of stalled, now that version 0.7 seems reasonably stable and portable (I see there's a <a href="https://mastodon.bsd.cafe/tags/nix" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>nix</span></a> pkg, unfortunately outdated, and a <a href="https://mastodon.bsd.cafe/tags/NetBSD" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NetBSD</span></a> <a href="https://mastodon.bsd.cafe/tags/pkgsrc" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pkgsrc</span></a> port, I will deliver <a href="https://mastodon.bsd.cafe/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>FreeBSD</span></a> *soon*).</p><p>It misses a few convenience features my previous <a href="https://mastodon.bsd.cafe/tags/qXmoji" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>qXmoji</span></a> had: save/restore the window size, optionally enforce a single instance, offer a <a href="https://mastodon.bsd.cafe/tags/tray" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>tray</span></a> icon. I'll add all of that, seems straight-forward, for the tray icon I'll only implement the old <a href="https://mastodon.bsd.cafe/tags/X11" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>X11</span></a> spec based on <a href="https://mastodon.bsd.cafe/tags/Xembed" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Xembed</span></a> and if some desktop environment insists on only supporting the newer standard based on <a href="https://mastodon.bsd.cafe/tags/dbus" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dbus</span></a>, well, screw that. Too much complexity, sorry.</p><p>The real issue is <a href="https://mastodon.bsd.cafe/tags/localization" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>localization</span></a> (<a href="https://mastodon.bsd.cafe/tags/l10n" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>l10n</span></a>), specifically "just" translations. I still have no good concept for that. With <a href="https://mastodon.bsd.cafe/tags/Qt" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Qt</span></a>, it was a no-brainer to also use Qt's mechanism. Without a toolkit, obvious choices would be either <a href="https://mastodon.bsd.cafe/tags/POSIX" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>POSIX</span></a> message catalogs, or <a href="https://mastodon.bsd.cafe/tags/GNU" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>GNU</span></a> <a href="https://mastodon.bsd.cafe/tags/gettext" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>gettext</span></a>. The latter is much more convenient, but pulls in extra deps (with <a href="https://mastodon.bsd.cafe/tags/GPL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>GPL</span></a>/#LGPL foo). Both have in common that they only operate on char* ... 8bit encodings. I have many of my texts stored as char32_t (<a href="https://mastodon.bsd.cafe/tags/Unicode" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Unicode</span></a> UCS-4 or <a href="https://mastodon.bsd.cafe/tags/UTF32" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>UTF32</span></a>, difference doesn't matter much here). I could redesign that to base everything on <a href="https://mastodon.bsd.cafe/tags/UTF8" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>UTF8</span></a>, but I'm a bit reluctant ... why add more runtime conversions?</p><p>I seriously think about coming up with my own tooling. But then, how far should I jump? Should I really try to parse my own source (using LLVM's <a href="https://mastodon.bsd.cafe/tags/libclang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>libclang</span></a> for example)? Or should I hardcode tables with identifiers for all translatable texts?</p><p>I'll sleep on that a few more nights I guess....</p><p><a href="https://mastodon.bsd.cafe/tags/X11" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>X11</span></a> <a href="https://mastodon.bsd.cafe/tags/emoji" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>emoji</span></a> <a href="https://mastodon.bsd.cafe/tags/keyboard" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>keyboard</span></a></p>