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

Welcome page show incorrect name ( %name%!) #12215

Closed
2 tasks done
decioesilva opened this issue Dec 7, 2022 · 8 comments
Closed
2 tasks done

Welcome page show incorrect name ( %name%!) #12215

decioesilva opened this issue Dec 7, 2022 · 8 comments

Comments

@decioesilva
Copy link

decioesilva commented Dec 7, 2022

Debug mode

Describe the bug

After creating a new user the welcome page has an incorrect name label (translations)

Reproduction steps

  1. Create a new user as requester permission only
  2. Login.
  3. The the welcome page has an incorrect name label (translations)
    ...

Expected behavior

Show name, not %name%!

Screenshots

image

Snipe-IT Version

6

Operating System

Ubuntu

Web Server

Apache

PHP Version

7.4

Operating System

Any

Browser

Any

Version

Any

Device

Any

Operating System

Any

Browser

Any

Version

Any

Error messages

No error code.

Additional context

File -> view-assets.blade.php

quoted codes:

              @extends('layouts/default')
              
              {{-- Page title --}}
              @section('title')
              {{ trans('general.hello_name', array('name' => $user->present()->fullName())) }}

              @parent
              @stop
@snipe
Copy link
Owner

snipe commented Dec 7, 2022

We don't use percent symbols anywhere in our code as variable placeholders, so I could not possibly tell you why you're seeing that. Are you sure you're using our version of this and not a modified version?

@section('title')
{{ trans('general.hello_name', array('name' => $user->present()->fullName())) }}
@parent
@stop

@snipe
Copy link
Owner

snipe commented Dec 7, 2022

(Percent symbols as variable markers tends to be more of a cold fusion/ASP thing, it's not really a thing in PHP)

@decioesilva
Copy link
Author

decioesilva commented Dec 7, 2022 via email

@decioesilva
Copy link
Author

(Percent symbols as variable markers tends to be more of a cold fusion/ASP thing, it's not really a thing in PHP)

I'm using a Azure VM Ubuntu with PHP/Apache

@snipe
Copy link
Owner

snipe commented Dec 9, 2022

Possibly there is some problem in obtaining the variable before loading the page “/account/view-assets”

If that were true, I'd expect a lot more issues about this. I am unable to reproduce this at all and cannot trigger this behavior on the demo either. Do you see it if you switch languages?

Screenshot 2022-12-08 at 5 00 29 PM

@snipe
Copy link
Owner

snipe commented Dec 9, 2022

I found it - whoever did the pt-BR translation substituted :name for %name% and I hadn't noticed while approving the translations. I'll have a fix for you shortly.

snipe added a commit that referenced this issue Dec 9, 2022
…r_ola_pt-BR

Fixed #12215 - string for “Hello, :name” in pt-BR was using `%`
@snipe snipe closed this as completed in 00ed197 Dec 9, 2022
@snipe
Copy link
Owner

snipe commented Dec 9, 2022

If you pull from master, you should be all set. Sorry for that mess-up. While my Portuguese isn't bad, we have a lot of strings. I think whoever translated that one thought they had to convert :name into something else.

@decioesilva
Copy link
Author

Great! Congrats!

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

2 participants