-
Notifications
You must be signed in to change notification settings - Fork 35
app is broken ? #1
Comments
Hi Alex, have you set your (or the demo account's) API Token? It's in the initializer: config/initializers/phrase.rb line 7 I've just updated the code so that you can just run it with our public demo account API Token out of the box. Please tell me if it works for you now. Please, tell me if we can help you setting up the in-context editor for your needs better or if we can assist you in getting started with PhraseApp. |
Thanks, it's working for me now,
=> it's OK the variable welcome_to_phrase_bar1 is proposed to me in the but I'm not getting some things for the whole process. => I created my new key in the layout (rails view) 2 things surprised me :
How is it supposed to work ? => where should I add a new key when developping ? in the phrase/_.yml thanks for your help 2014-06-04 23:03 GMT+02:00 Frederik Vollert notifications@github.com:
|
Hi Alex,
Are you using your own trial account and its auth token or the demo account's auth token that I added to the project? If so: It's easier to create a new account (less than 150 translation keys is free) and use the example projects auth token. Main or default locale can be selected in the translation center, when you sign in to the account and go to your project's languages. 1 .Go to https://phraseapp.com/projects , sign in and go to Languages. Here you can create a new locale and chose any locale as "Make default locale" on the right side of the Locale Settings. The locale name is also different from the locale or used language / dialect. You may have a locale named "main", but containing british english (en-GB). In Rails projects usually a 2 letter abbreviation of the language ("en", ISO 639-1 "English") or the version with dash and locale language version ("en-GB", ISO 3166-1 "British English").
The demo account is somewhat different as many people use it to play around and it may contain different locales. If you used your own account, is your english locale maybe named "main" ?
The translation key is created on the first time it receives any translation content for it. You can either use a development or your default locale and add a translation and hit save or you can create keys by adding them to the default locale file and using "phrase push" to push changed keys to PhraseApp. There are gems that can either extract keys into a local locale file like https://github.com/shaiguitar/haml-i18n-extractor or even create internationalized versions of non-i18n partials https://github.com/douglasjsellers/herbgobbler. However, most commonly in iterative processes the locale file is amended by the developer that writes the partials. (Also because translations may be used in controllers, modules or other parts of applications).
The in-context editor should be used in a local or staging environment, it is a pre-production tool for copywriters or translators to see the placeholder's context. Before deploying we urge you to use "phrase pull" to download latest locale changes and use the /phrase/*.yml locales as locales for production or testing (e.g. on the build server) and commit them to the repo in order to deploy them with the repo to production. (Changes to locales may also happen in our web frontend, the Translation Center, e.g. when you order translations directly through our platform - many of our customers mainly use this platform). You can integrate with the phrase API in any way you want (the phrase gem is merely a REST Client for our own API), but it is not intended for delivering live translation / content changes to your production system directly. (However, you could think of a background task or cron job that updates locales every couple of hours pro-actively.) Broken locales (e.g. localization, Yaml Arrays) may break production and although we try to offer validations for most common cases, translators may cause unintended Exceptions on production when able to make "live" changes.
New keys should be added in locales/.yml and then pushed to phrase via "phrase push".
Your welcome! If you want, you can get in touch with us at any time in our support on UserVoice (http://support.phraseapp.com/). |
I'm getting this error when trying to access to localhost:3000
Phrase::Api::Exceptions::Unauthorized in Tasks#index
Showing /Users/alexis/rails/demo-rails-app/app/views/tasks/index.html.erb where line #6 raised:
Error: Unknown Error (401)
Extracted source (around line #6):
Application Trace | Framework Trace | Full Trace
app/views/tasks/index.html.erb:6:in
block in _app_views_tasks_index_html_erb___531558376134898250_70228402349560' app/views/tasks/index.html.erb:4:in
each'app/views/tasks/index.html.erb:4:in
_app_views_tasks_index_html_erb___531558376134898250_70228402349560' app/controllers/tasks_controller.rb:8:in
index'Request
Parameters:
None
The text was updated successfully, but these errors were encountered: