← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1432798] [NEW] Action directive uses isolated scope, makes it difficult to pass in translated texts.

 

Public bug reported:

Assume that I have an object containing translated texts.
labels = {
  hi: gettext('hi'),
  ho: gettext('ho')
}

The current architecture does not let me embed translated text into
angular template directly. We have a separate work item to address this
in L. So the current implementation is to use this object in our
template for translated texts.

Current the Action directive uses isolated scope. 
scope = {
  actionClasses: '=?',
  callback: '=?',
  disabled: '=?',
  item: '=?'
}

This poses a problem because we can no longer use the translated text in this directive.
Solutions that might work:

1. Use transclude: true for directive
2. Add labels attribute to directive

** Affects: horizon
     Importance: Medium
     Assignee: Kelly Domico (kelly-domico)
         Status: New

** Changed in: horizon
   Importance: Undecided => Medium

** Changed in: horizon
    Milestone: None => kilo-rc1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1432798

Title:
  Action directive uses isolated scope, makes it difficult to pass in
  translated texts.

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Assume that I have an object containing translated texts.
  labels = {
    hi: gettext('hi'),
    ho: gettext('ho')
  }

  The current architecture does not let me embed translated text into
  angular template directly. We have a separate work item to address
  this in L. So the current implementation is to use this object in our
  template for translated texts.

  Current the Action directive uses isolated scope. 
  scope = {
    actionClasses: '=?',
    callback: '=?',
    disabled: '=?',
    item: '=?'
  }

  This poses a problem because we can no longer use the translated text in this directive.
  Solutions that might work:

  1. Use transclude: true for directive
  2. Add labels attribute to directive

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1432798/+subscriptions


Follow ups

References