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

Localization error for PagerInfo on Volo.Abp.UI #3277

Closed
gterdem opened this issue Mar 20, 2020 · 4 comments
Closed

Localization error for PagerInfo on Volo.Abp.UI #3277

gterdem opened this issue Mar 20, 2020 · 4 comments

Comments

@gterdem
Copy link
Contributor

gterdem commented Mar 20, 2020

arguments for string.Format(localizedString.Value, arguments) are
arguments[0]= _START_
arguments[1]= _END_
arguments[2]= _TOTAL_

Hence;

"PagerInfo": "_TOTAL_ kayıttan _START_ ile _END_ arası gösteriliyor."

should be

"PagerInfo": "{2} kayıttan {0} ile {1} arası gösteriliyor."

for

  • tr.json
  • zh-Hans.json
  • zh-Hant.json

"PagerInfo": "Showing _START_ to _END_ of _TOTAL_ entries"

should be

"PagerInfo": "Showing {0} to {1} of {2} entries"

for

  • en.json
  • ar.json
  • cs.json
  • es.json
  • pl.json
  • pt-BR.json
  • vi.json

However if we change all of the localizations this way, newly added localization sources will have problem distinguishing which one is _START_, _END_ and _TOTAL_.
Thinking about changing the name of PagerInfo to PagerInfoRef as a reference since commenting now allowed in json and adding correct values to PagerInfo.
Or keep it changed already and assume whomever localizes know english and can figure it out from en.json.

@hikalkan @yekalkan
Suggestions?

@hikalkan
Copy link
Member

hikalkan commented Apr 7, 2020

didn't understand at all. we can chat about it.

@hikalkan
Copy link
Member

hikalkan commented Apr 7, 2020

assume whomever localizes know english and can figure it out from en.json.

Yes, we assume it.

@hikalkan hikalkan modified the milestones: 2.5, 2.6 Apr 8, 2020
@hikalkan hikalkan modified the milestones: 2.6, 2.5 Apr 8, 2020
@hikalkan hikalkan assigned yekalkan and unassigned gterdem Apr 8, 2020
@hikalkan hikalkan modified the milestones: 2.6, 2.5 Apr 8, 2020
@ebicoglu ebicoglu modified the milestones: 2.5, 2.6 Apr 10, 2020
@hikalkan
Copy link
Member

@yekalkan can you review #3538
I suppose it solves this issue.

@yekalkan
Copy link
Member

Hi,

@hikalkan No, it doesn't. I won't approve it.

I didn't use parameters as "{0},{1}" because they are not for our tag helpers, they are for datatables localization.

See https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js#L350

It was a mistake to use same localizations for tag helpers. I'll fix it.

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

No branches or pull requests

4 participants