• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MycroftAI / mycroft-core / 1788
50%

Build:
DEFAULT BRANCH: dev
Ran 03 May 2017 07:32PM UTC
Jobs 1
Files 77
Run time 9s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1788

push

travis-ci

forslund
Adding localization mechanism for strings embedded in mycroft-core code (#717)

* Adding localization mechanism for strings embedded in mycroft-core code

Added mycroft.dialog.get() function.  This behaves much like the localization
mechanism for dialogs in Skills.  So you can do things like this:

   lang = "en-us"
   str = mycroft.dialog.get("how are you", lang)

Which will look in mycroft/res/text for the dialog file containing strings to
use as templates for the actual output.  This depends on the language being
currently used.  When operating in English this would be:

   mycroft/res/text/en-us/how are you.dialog

This function will pick a random line from that file to assign to str.

A more advanced use is to embed placeholders in the strings within the
template file.

   lang = "en-us"
   ctx = {"time" : "noon"}
   str = mycroft.dialog.get("current time", lang, ctx)

And the random template line picked was "the current time is {{time}} ", then
the output would be:

   "the current time is noon"

1567 of 4566 relevant lines covered (34.32%)

0.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1788.1 (IS_TRAVIS=true) 03 May 2017 07:32PM UTC 0
34.32
Travis Job 1788.1
Source Files on build 1788
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1788
  • e1fa41bf on github
  • Prev Build on dev (#1780)
  • Next Build on dev (#1789)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc