Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

css for ion-tab does not work with i18n properly #804

Open
jesse23 opened this issue Dec 5, 2017 · 2 comments
Open

css for ion-tab does not work with i18n properly #804

jesse23 opened this issue Dec 5, 2017 · 2 comments
Labels

Comments

@jesse23
Copy link

jesse23 commented Dec 5, 2017

Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
[x] 4.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request

Please do not submit support requests or "How to" questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
i18n string is there in source:

<span class="tab-button-text">Hello</span>

But it is chew up by improper css definition.
image

Expected behavior:

Well, show it properly.

Steps to reproduce:

  1. Get OOTB Tabs template
  2. Do ionic i18n by following http://ionicframework.com/docs/developer-resources/ng2-translate/
  3. Do def below:
  <ion-tab [root]="tab1Root" [tabTitle]="( 'HELLO' | translate )" tabIcon="home"></ion-tab>

3 run ionic-app-scripts serve

Related code:

insert short code snippets here

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here
@jesse23
Copy link
Author

jesse23 commented Dec 5, 2017

Current WA is overwrite the CSS forcibly at tab.scss:

.tab-button-text {
  display: block;
}

@mhartington
Copy link
Member

Can confirm, seeing this as well in a demo. Looks like the issue is here, where we're setting some values on the tab-button

https://github.com/ionic-team/ionic/blob/master/src/components/tabs/tab-button.ts#L51-L60

@brandyscarney brandyscarney transferred this issue from ionic-team/ionic-framework Dec 3, 2018
@ionitron-bot ionitron-bot bot added the triage label Dec 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants