linuxmint / linuxmint/nemo

Filenames starting with RTL characters cause incorrect rendering in the status bar

Open
#3,542 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.6k
Forks
368
Avg merge
4d 4h
Merged PRs (30d)
2

Description

Distribution

Linux Mint 22 Cinnamon

Package version

nemo 6.2.8

Frequency

Always

Bug description

Filenames starting with RTL characters cause incorrect rendering in the status bar

Steps to reproduce

Create a file with a name beginning with a right-to-left character, for example "קובץ.txt" and select the file. Look at the status bar at the bottom of the Nemo window.

Image

"file.txt" selected ...

Image

"קובץ.txt" selected ...

Image

"פריט" selected ...

Expected behavior

‎"file.txt" selected ...

‎"קובץ.txt" selected ...

‎"פריט" selected ...

Additional information

The base direction of the status bar text needs to be set to LTR. More information (in the context of the web, but still relevant): https://www.w3.org/International/articles/inline-bidi-markup/uba-basics#base_dir_scope

If the OS language is set to Hebrew (or presumably Arabic or any other RTL language) the status bar needs to have a base direction of RTL. Current results are broken:

Image
Image

Result isn't too bad if the filename starts with RTL, although "34.6 GB" and "1 byte" should each be bidi-isolated for better output.

Image

With an English-language file, the status bar is extremely hard for the user to parse.

A universal fix (without explicitly setting the base direction) would be to bidi-isolate each of the variables: filename, file size, remaining space. Simple explanation of isolation: https://www.w3.org/International/articles/inline-bidi-markup/uba-basics#isolation

Depending on your GUI library, there may be a "correct" way to do this. In HTML it would be:

<div class="statusbar">
"<span dir="auto">file.txt</span>" selected (<span dir="auto">1 byte</span>), Free space: <span dir="auto">34.6 GB</span>
</div>

If the GUI library doesn't have native functions for this, the same effect can be achieved with Unicode characters:

"\u2068file.txt\u2069" selected (\u20681 byte\u2069), Free space: \u206834.6 GB\u2069

https://www.w3.org/International/questions/qa-bidi-unicode-controls#basedirection

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Nemo's status bar with filenames beginning in Hebrew or other right-to-left characters, and compare the output with the expected left-to-right and right-to-left behavior. Locate the status bar text assembly and inspect how the filename, file size, and free-space values are combined. Done means these values remain readable in both LTR and RTL locales, including bidi isolation where needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop, internationalization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.