Bug 417713 - Emoji picker doesn't show emojis for some locales
Summary: Emoji picker doesn't show emojis for some locales
Status: RESOLVED REMIND
Alias: None
Product: plasmashell
Classification: Plasma
Component: Emoji Selector (show other bugs)
Version: 5.18.0
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 417517 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-15 16:41 UTC by popov895
Modified: 2022-09-07 12:24 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description popov895 2020-02-15 16:41:07 UTC
SUMMARY

For some locales emoji picker doesn't show emojis. There are no ibus/dicts/emoji-*.dict files for these locales.

STEPS TO REPRODUCE
1. Run in terminal 'LANG=IT-CH ibus-ui-emojier-plasma'

OBSERVED RESULT

Emoji picker doesn't show emojis.

EXPECTED RESULT

Emoji picker shows emojis.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Neon 5.18
KDE Plasma Version: 5.18.0
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2
Comment 1 Nate Graham 2020-02-16 21:19:47 UTC
Do you have the noto-emoji font installed?
Comment 2 popov895 2020-02-16 23:06:28 UTC
Yes, I have installed fonts-noto-color-emoji package.
Comment 3 popov895 2020-02-16 23:12:29 UTC
https://github.com/KDE/plasma-desktop/blob/d43007c4317a9f1c610875d65409f8ad3ea2823d/applets/kimpanel/backend/ibus/emojier/emojier.cpp#L134

If locale is IT-CH, the picker tries to find file ibus/dicts/emoji-IT_CH.dict that doesn't exists and therefore EmojiModel is empty.
Comment 4 Nate Graham 2020-02-16 23:14:08 UTC
Thanks.
Comment 5 popov895 2020-02-16 23:15:08 UTC
A possible duplicate of bug 417517
Comment 6 Nate Graham 2020-02-16 23:16:34 UTC
*** Bug 417517 has been marked as a duplicate of this bug. ***
Comment 7 Aleix Pol 2020-02-20 01:08:26 UTC
Git commit 358e98a75a946abe76ffdfeddd0156483a66d4b3 by Aleix Pol.
Committed on 20/02/2020 at 01:07.
Pushed by apol into branch 'Plasma/5.18'.

emojier: improve the fallback mechanism to detect languages

- try to find the exact locale.
- Include the more generic one.
- If none were found, use English.

M  +18   -5    applets/kimpanel/backend/ibus/emojier/emojier.cpp

https://commits.kde.org/plasma-desktop/358e98a75a946abe76ffdfeddd0156483a66d4b3
Comment 8 popov895 2020-02-20 16:20:38 UTC
Just looked emojier.cpp. I know that this is not the place to ask about the source code, but why are you using C-style casts instead of static_cast?
Comment 9 Murz 2022-08-03 06:35:38 UTC
I have the same problem on Ubuntu 22.04, but it seems that just the dictionary is missing:
```
$ ibus-ui-emojier-plasma
could not find ibus emoji dictionaries. "ibus/dicts/emoji-en.dict"
qml: There's no page to replace
qrc:/ui/CategoryPage.qml:80:5: QML Shortcut: Shortcut: Only binding to one of multiple key bindings associated with 9. Use 'sequences: [ <key> ]' to bind to all of them.
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/PlaceholderMessage.qml:235:5: QML Heading: Binding loop detected for property "verticalAlignment"
qml: Calling replace on empty PageRow CategoryPage_QMLTYPE_156(0x564884e1c110)
$ LANG=en_US.UTF-8 ibus-ui-emojier-plasma
could not find ibus emoji dictionaries. "ibus/dicts/emoji-en.dict"
qml: There's no page to replace
qrc:/ui/CategoryPage.qml:80:5: QML Shortcut: Shortcut: Only binding to one of multiple key bindings associated with 9. Use 'sequences: [ <key> ]' to bind to all of them.
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/PlaceholderMessage.qml:235:5: QML Heading: Binding loop detected for property "verticalAlignment"
qml: Calling replace on empty PageRow CategoryPage_QMLTYPE_156(0x558a843f3140)
$ LANG=en_US ibus-ui-emojier-plasma
could not find ibus emoji dictionaries. "ibus/dicts/emoji-en.dict"
qml: There's no page to replace
qrc:/ui/CategoryPage.qml:80:5: QML Shortcut: Shortcut: Only binding to one of multiple key bindings associated with 9. Use 'sequences: [ <key> ]' to bind to all of them.
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/PlaceholderMessage.qml:235:5: QML Heading: Binding loop detected for property "verticalAlignment"
qml: Calling replace on empty PageRow CategoryPage_QMLTYPE_156(0x55fe9a851d60)
$ 
```
Comment 10 Murz 2022-08-03 06:38:05 UTC
Installing the `ibus-data` package resolves my problem:
```
sudo apt install ibus-data

```
Comment 11 Ammar 4K 2022-09-07 12:24:10 UTC
make sure you have a noto-emojie.ttf font in your /usr/share/fonts/<can be any name here but I use "noto">/