2

I am developing a CakePHP application with DART as the Frontend. I am currently using the Intl library to translate messages in French, and when launching my main.html in the Dartium browser within Eclise, the messages show up fine. However, when I do a pub build of the project and browse to "http://portal/login" in my browser, the Intl library messages are not appearing. Here is how my functions are written:

login.dart

username.placeholder = usernamePlaceholder();

I have 2 automatically generated files called "content_messages_all.dart" and "content_messages_fr.dart". The fr file contains the translations. Is there anything I should be looking for that can cause this error? Even the English text will not display. The English messages are in a "translations.dart" file, declared like so:

String usernamePlaceholder() {
  return  Intl.message(
    "E-mail or username",
    name: "usernamePlaceholder",
    args: [],
    desc: "Displays username placeholder on login page.");
}
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

1

Found out the solution! Turns out I needed to link a few missing .js files into the webroot folder. The files were in the build folder. "Frontend/build/web" folder. The names of the files were "main.dart.js_1.part.js" and "login.dart.js_1.part.js".

  • Yes. Those are deferred-loaded JS files. The Intl package generates each separate language as a deferred-load, so you don't have pull them all down every time. – Alan Knight Nov 06 '14 at 19:31