snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.96k stars 3.16k forks source link

Name display error #14658

Open zerohashone opened 5 months ago

zerohashone commented 5 months ago

Debug mode

Describe the bug

Snipe-IT http://127.0.0.1/account/view-assets There is a problem with the display order of "lastname firstname". Regardless of whether the name set format in http://127.0.0.1:/admin/localization is "firstname lastname" or "lastname firstname", the name in http://127.0.0.1/account/view-assets is displayed as "firstname lastname"

Another problem is that the names of Chinese people are displayed incorrectly. Chinese names have the lastname and then the firstname. There is no space between the lastname and firstname. For example, the Chinese name is displayed as "张三". "张" is the lastname and "三" is the fistname. There is no space between "张" and "三". However, Snipe-IT always has spaces between lastname and firstname, which does not comply with Chinese localization specifications.

Removing the spaces in Chinese names when displaying, or adding options to set names without spaces, or directly merging the firstname and lastname into one field should solve the problem.

Reproduction steps

  1. Use admin user open http://localhost/admin/localization
  2. Set Name Display Format as "Last Name First Name (Smith Jan)"
  3. Chose another user open http://localhost/account/view-assets ...

Expected behavior

When a user open http://127.0.0.1/account/view-assets, the name can be displayed as "LastnameFirstname" with no space between the last name and the first name. The surname comes first, the given name comes last.

Screenshots

01-snipeit-localization 02-snipeit-LastnameFirstname 03-snipeit-LastnameFirstname

Snipe-IT Version

v6.3.4

Operating System

Rocky Linux 9.3

Web Server

Apache/2.4.57 (Rocky Linux)

PHP Version

PHP 8.0.30 (cli) (built: Aug 3 2023 17:13:08) ( NTS gcc x86_64 )

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

welcome[bot] commented 5 months ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.