-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Implemented the Localization using ngx-translate Module #830
Conversation
Team, @lexzhukov, @nnixaa,, Any Update on this PR ? |
@@ -1,15 +1,15 @@ | |||
<li *ngIf="!menuItem.hidden" [title]="menuItem.title" [ngClass]="{'al-sidebar-list-item': !child, 'ba-sidebar-sublist-item': child, 'selected': menuItem.selected && !menuItem.expanded, 'with-sub-menu': menuItem.children, 'ba-sidebar-item-expanded': menuItem.expanded}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be [title]="menuItem.title | translate"
to display correct text when hover on menu item.
Btw, Thanks for great work!
Hey @ramsunvtech, many thanks! @lexzhukov let's merge this once you have time. |
Hope you guys planned to update the localization everywhere. Let me know if
you guys want me to update it everywhere once its get merged.
If you guys can look in to this. i have a different feature as well to
update.
…On Sat, Apr 8, 2017 at 1:23 PM, Dmitry Nehaychik ***@***.***> wrote:
Hey @ramsunvtech <https://github.com/ramsunvtech>, many thanks! @lexzhukov
<https://github.com/lexzhukov> let's merge this once you have time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#830 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABk3lTCU0nj0HcFpJS04qMzOJ1G4ZEb0ks5rtzzwgaJpZM4MaTp_>
.
--
Thanks,
Venkatraman
|
I don't know why translation work on menu & shared components but not in detail pages (ex: login). Login.html<div class="offset-sm-2 col-sm-10">
<button [disabled]="!form.valid" type="submit" class="btn btn-default btn-auth">{{'pages.login.signin' | translate}}</button>
<a routerLink="/login" class="forgot-pass">Forgot password?</a>
</div> checkboxInputs.html<label class="radio-inline custom-radio nowrap">
<input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1">
<span translate>{{'general.option1'}}</span>
</label> Did u try to translate everywhere in project? Do you have any suggestion? It took me days and I still stuck in that. Best regards, |
@ManhLQ, My PR is base setup not updated the whole project. Once its merged. i will raise PR block by block which will have less time to review and get things available in SolutionYou should import Why we need to include in every module?Since we don't have any shared Module which has translate module and other common module. |
@nnixaa / @lexzhukov, Its been a month for this feature to get reviewed and get merged. |
package.json
Outdated
@@ -18,6 +18,8 @@ | |||
"@angularclass/conventions-loader": "1.0.13", | |||
"@angularclass/hmr": "1.2.2", | |||
"@angularclass/hmr-loader": "3.0.2", | |||
"@ngx-translate/core": "^6.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use fixed version of the dependencies and install new dependencies through yarn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the fixed version but yarn command for @ngx-translate
has some issues.
$ yarn add [email protected]:akveo/ng2-admin.git
yarn add v0.22.0
[1/4] Resolving packages...
error Command failed.
Exit code: 128
Command: git
Arguments: clone github.com:akveo/ng2-admin.git C:\Users\vramamoorthy\AppData\Local\Yarn\cache\v1\.tmp\01867858a5cc6b0b0eed6a441c29c8c6
Directory: D:\Projects\ng2-admin
Output:
Cloning into 'C:\Users\vramamoorthy\AppData\Local\Yarn\cache\v1\.tmp\01867858a5cc6b0b0eed6a441c29c8c6'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
$ yarn add @ngx-translate/core
yarn add v0.22.0
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@ngx-translate/core: Not found".
info If you think this is a bug, please open a bug report with the information provided in "D:\\Projects\\ng2-admin\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
``
…adcrumb and Menu Link Titles Removed the Test EN Locale File Fixed the Build Error Updated the Translate for HTML Attribute Values Upgraded from ng2-translate to ngx-translate and updated to the Dashboard and Form Pages Fixed the Build Issue by Typo Updated the Fixed Version for @ngx-translate/core
@ramsunvtech thanks for your PR. |
@lexzhukov: You are welcome |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Localization Feature to Keep text in one file and that can be changed according to the country and language.
What is the current behavior? (You can also link to an open issue here)
All Text Labels are hard coded in the Code.
What is the new behavior (if this is a feature change)?
Few Page's Text Labels are moved to one file and its dynamic according to the country and language.
Other information:
Currently implemented with
ngx-translate
for basic blocks. if this implementation is fine, please goahead and merge so that i can complete this for the entire ng2-admin.