Skip to content

Conversation

@jehernandezrodriguez
Copy link
Contributor

@jehernandezrodriguez jehernandezrodriguez commented Apr 5, 2020

Part of WEB-279

Creation of a Spanish version for the files. Spanish language was added in the i18next configuration.

I upload key translations (spanish), I don't know if it's necessary.

Copy link
Member

@clintonium-119 clintonium-119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing this back with us.

I have a couple small changes requested -- mostly to do with fixing the automated tests.

Just ping me for re-review when you've implemented them, and I'll get this merged. I am going to need to check with the appropriate team members for whether or not I can merge in community-provided translations, but for now, let's leave them here.

const { Loader } = vizComponents;
const { findBasicsStart, getLocalizedCeiling, getTimezoneFromTimePrefs } = vizUtils.datetime;
const { commonStats, getStatDefinition } = vizUtils.stat;
const t = i18next.t.bind(i18next);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed here, since the t prop is being added in to this React class automatically.

},

renderEmptyHeader: function(title = 'Preparing Chart Data') {
renderEmptyHeader: function(title = t('Preparing Chart Data')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using t in the function signature here solves the issue you were addressing, but is causing the automated lint test to fail.

I suggest setting the default title within the function body. Something like:

  renderEmptyHeader: function(title) {
    const { t } = this.props;
    const headerTitle = title || t('Preparing Chart Data');
    return (
      <Header
        chartType={'no-data'}
        inTransition={false}
        atMostRecent={false}
        title={headerTitle}
        ref="header"
      />
    );
  },

},
"sort": true,
"locales": ["en", "fr"]
"locales": ["en", "fr","es"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nitpick -- should have a space after the comma for consistency.

@clintonium-119
Copy link
Member

One other thing: we'll need you to agree to our VCLA with a comment here before I can merge as well.

The details can be found at https://developer.tidepool.org/contributors/#making-contributions

@jehernandezrodriguez
Copy link
Contributor Author

jehernandezrodriguez commented Apr 7, 2020

I agree to the terms of Tidepool Project’s Volunteer/Contributor License Agreement v1.1 as it exists at http://tidepool-org.github.io/files/TidepoolVCLA-1.1.pdf on 06/april/2020 and I sent mail to account legal@tidepool.org.

@clintonium-119 clintonium-119 merged commit 799d581 into tidepool-org:develop Apr 7, 2020
@clintonium-119 clintonium-119 changed the title Feature/spanish [WEB-279] Feature/spanish Apr 29, 2020
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

Successfully merging this pull request may close these issues.

2 participants