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

WIP: [Med][Aug]Dynamically adding rows to the ngx-platform table - Create, Save and Cancel button labels should be externalized for translations. #9760

Closed
nehabeke opened this issue Apr 27, 2023 · 13 comments
Labels
question Further information is requested

Comments

@nehabeke
Copy link

nehabeke commented Apr 27, 2023

Is this a bug, enhancement, or feature request?

bug

Briefly describe your proposal.

I am using ngx platfrom table - https://sap.github.io/fundamental-ngx/#/platform/table/basic
Where I am using property called [editMode]="'inline'" to add rows dynamically to the table.
This property automatically generates 3 buttons: Create, Save and Cancel. These "Create", "Save" and "Cancel" button labels are not localized properly. These strings should be externalized for translations.

image

image

image

Which versions of Angular and Fundamental Library for Angular are affected? (If this is a feature request, use current version.)

Angular CLI: 15.2.0
"@fundamental-ngx/core": "0.40.2-rc.8",
"@fundamental-ngx/platform": "0.40.2-rc.8",

If this is a bug, please provide steps for reproducing it.

Please provide relevant source code if applicable.

https://stackblitz.com/run?file=src%2Fmain.ts

Is there anything else we should know?

@github-actions
Copy link

Hello @nehabeke, thank you for using fundamental-ngx! The fundamental-ngx team will triage your issue as soon as possible.

@nehabeke
Copy link
Author

nehabeke commented Jun 9, 2023

Hi, Would you kindly give prompt attention to this particular issue? Please let me know If you have any questions, I will be happy to help.

@droshev droshev changed the title Dynamically adding rows to the ngx-platform table - Create, Save and Cancel button labels should be externalized for translations. [Med][Aug]Dynamically adding rows to the ngx-platform table - Create, Save and Cancel button labels should be externalized for translations. Jun 16, 2023
@fkolar
Copy link
Member

fkolar commented Jun 26, 2023

@nehabeke

I checked and the translation is in place

Screenshot 2023-06-26 at 12 44 34 Screenshot 2023-06-26 at 12 44 31

It is just some languages might not be fully translated.

  • Which language is the problem here? (we can use temporary Google Translate to do this)

@mikerodonnell89, @N1XUS , there was some way a workaround where application could override some translation right?

@nehabeke
Copy link
Author

Hi,

I have asked someone from doc team to check this. I will get back to you once I hear back from her.

Thanks,
Neha

@nehabeke
Copy link
Author

This another bug is similar to this one, could you please take a look at this as well?
#9884

Thanks,
Neha

@N1XUS
Copy link
Contributor

N1XUS commented Jun 27, 2023

@fkolar @nehabeke You can patch language values by using patchLanguage provider: https://github.com/SAP/fundamental-ngx/blob/main/libs/i18n/src/lib/utils/patch-language.ts

@N1XUS
Copy link
Contributor

N1XUS commented Jun 27, 2023

Additionally, you can simply clone one of translation objects, rewrite the language values to your needs, and provide it as a language. Since FD_LANGUAGE is a BehaviourSubject, you can emit next value at any time you want.

@fkolar
Copy link
Member

fkolar commented Jun 27, 2023

Hi,

I have asked someone from doc team to check this. I will get back to you once I hear back from her.

Thanks, Neha

Ok. in meanwhile we have a workaround but please get us the information what language does not have the translation. There should be no needs to provide custom translation for those buttons.

@nehabeke
Copy link
Author

Hi, we have checked, it is not working for any of the languages.

@fkolar
Copy link
Member

fkolar commented Jun 28, 2023

Can you double check? I see something different. in the navigation bar change the language to French for example...

https://fundamental-ngx.netlify.app/#/platform/table/basic#basic-add-rows

@fkolar
Copy link
Member

fkolar commented Jun 28, 2023

Can you check the link I sent you? There is a table with create button. in the top right corner you can change a lang.
Also one. recommendation don't copy screenshots from internal application!

Please be informed that Issues prefixed WIP are issues in progress and they need some more work and F-NGX
will not look at them, until I will remove this prefix

Screenshot 2023-06-29 at 11 09 59 Screenshot 2023-06-29 at 11 09 49

@fkolar fkolar changed the title [Med][Aug]Dynamically adding rows to the ngx-platform table - Create, Save and Cancel button labels should be externalized for translations. WIP: [Med][Aug]Dynamically adding rows to the ngx-platform table - Create, Save and Cancel button labels should be externalized for translations. Jun 29, 2023
@fkolar fkolar added the question Further information is requested label Jun 29, 2023
@nehabeke
Copy link
Author

It is working in the link you have provided. But not working in the application. I am not getting why. Could you please recommend any other solution for this?

@fkolar
Copy link
Member

fkolar commented Jul 14, 2023

I would definitely check:
https://sap.github.io/fundamental-ngx/#/core/i18n
https://github.com/SAP/fundamental-ngx/blob/main/apps/docs/src/app/app.module.ts
https://github.com/SAP/fundamental-ngx/blob/main/libs/docs/core/toolbar/toolbar-docs.component.ts

Closing as this is more about how to use certain thing that can be discussed offline + there is another issue related to i18n #10137

@fkolar fkolar closed this as completed Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants