Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing Text in 7.0.5 #14973

Closed
2 tasks done
GustelDE opened this issue Jun 26, 2024 · 10 comments
Closed
2 tasks done

missing Text in 7.0.5 #14973

GustelDE opened this issue Jun 26, 2024 · 10 comments

Comments

@GustelDE
Copy link

GustelDE commented Jun 26, 2024

Debug mode

Describe the bug

We see strange looking "Buttons" or missing text in E-Mails:

snipe1

snipe2

Reproduction steps

  1. Upgrades from 6.4.2 to 7.0.5 (Linux/Docker)
  2. composer dump-autoload; php artisan cache:clear; php artisan config:clear; php artisan route:clear; php artisan debugbar:clear; php artisan event:clear; php artisan view:clear; php artisan optimize:clear; php artisan clear-compiled

Expected behavior

Thext should be text, no placeholder...

Screenshots

No response

Snipe-IT Version

7.0.5

Operating System

Oracle-Linux 8, Docker

Web Server

Docker-Verison

PHP Version

Docker-Verison

Operating System

Win10

Browser

Firefox and Chrome

Version

FF 127.0.1 / Chrome 126.0.6478.116

Device

Operating System

Browser

Version

Error messages

composer check-platform-reqs
Checking platform requirements for packages in the vendor dir
composer-runtime-api 2.2.2      success
ext-bcmath           8.1.2      success
ext-ctype            *          success provided by symfony/polyfill-ctype
ext-curl             8.1.2      success
ext-date             8.1.2      success
ext-dom              20031129   success
ext-fileinfo         8.1.2      success
ext-filter           8.1.2      success
ext-gd               8.1.2      success
ext-hash             8.1.2      success
ext-iconv            8.1.2      success
ext-json             8.1.2      success
ext-libxml           8.1.2      success
ext-mbstring         *          success provided by symfony/polyfill-mbstring
ext-openssl          8.1.2      success
ext-pcre             8.1.2      success
ext-pdo              8.1.2      success
ext-session          8.1.2      success
ext-simplexml        8.1.2      success
ext-sodium           8.1.2      success
ext-tokenizer        8.1.2      success
ext-zip              1.19.5     success
php                  8.1.2      success

php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
json
ldap
libxml
mbstring
mcrypt
memcached
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Additional context

No response

@GustelDE GustelDE changed the title missing Text missing Text in 7.0.5 Jun 26, 2024
@snipe
Copy link
Owner

snipe commented Jun 26, 2024

The translations are there though. If you set FALLBACK_APP_LOCALE to en-US, do you still see the problem?

@PhilippS23
Copy link

I got the same problem after upgrading, standard language is German. I added the line FALLBACK_APP_LOCALE=en-US to the .env.
Problem solved for me

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

@PhilippS23 I hate that solution though, since it means the backup notification emails (if you use them) will show up weird. It's an unfortunate side-effect of the two-letter (en) versus four-letter (en-US) translation choices the backup library made versus the way we do them. Both versions are technically correct and RFC compliant, but the way the framework works, keeping the fallback to en-US means it won't find the translations for the backup emails, since they'll be looking in en, which we don't have.

The "Requested Items" is a new string, but the mail test string hasn't changed in eons, so I wonder why that one is just popping up. What do you two have your language set to? I know you said German, but is that formal or informal? (de-DE or de-if)?

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

I just pushed up the latest translations to master. If you do a git pull and set your fallback back to en, are you still seeing this?

@PhilippS23
Copy link

PhilippS23 commented Jun 26, 2024

I know you said German, but is that formal or informal? (de-DE or de-if)?

It was set to "de", I changed to "de-DE" and added the fallback "en-US", now everything seems normal to me. With only "de" in the .env file my recent activities looked like this:
grafik

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

Ugh. I sort of knew this might happen. It's not exactly our fault, just a problem in the way the vendor translations work.

So the priority is always:

  • APP_LOCALE - set in the env
  • Admin > Localization setting locale
  • Individual profile language
  • fallback locale - if the system can't find a matching string in de-DE, it will try to use this language

Since all of our translations use the xx-XX format, but the backup library uses xx, that fallback will not work for the backup emails (since xx-XX does not exist in the resources/lang/vendor directory, only xx does).

I dislike the idea of renaming the vendor translation directories to match ours, since as they add new languages, etc, we'll have to remember to keep renaming those each time, but I'm not sure we have a choice.

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

(Thank you, both of you, for raising this issue. Sorry it's a bit of a hassle. I'll tag shortly 7.0.6 to handle this.)

@snipe
Copy link
Owner

snipe commented Jun 26, 2024

I just tagged 7.0.6 which I think should help this issue. Thank you both again.

@snipe snipe closed this as completed Jun 26, 2024
@PhilippS23
Copy link

Awesome, thank you👍

@GustelDE
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants