gadicc / meteor-messageformat

MessageFormat i18n support for Meteor, with reactive templates
54 stars 22 forks source link

No submit button for translations in /translate UI #252

Closed monitz87 closed 7 years ago

monitz87 commented 7 years ago

I'm trying to input new translations in the UI but there is no way of actually submitting them. I searched the repository for the UI html and js files, and there is no visible way to submit translations for my strings. Is there something I'm missing?

DSpeichert commented 7 years ago

The only way to add new translations is by putting strings to translate in your code. Then they get detected automatically. Like this:

<h1>{{mf 'heading_welcome' 'Welcome to my Site'}}</h1>
monitz87 commented 7 years ago

I have those, the thing is that when I go to the translation UI I cannot translate them to another language. I'm getting "insert failed: Access denied undefined" in the client

DSpeichert commented 7 years ago

Check http://messageformat.meteorapp.com/docs#security

monitz87 commented 7 years ago

Yeah, my bad, I missed that part. Thanks

DSpeichert commented 7 years ago

No problem!

monitz87 commented 7 years ago

One thing that led to my confusion though, is that you can still access the /translate route even if you aren't allowed to edit it. (For example I wasn't logged in as any user and thus could not insert new translations, but I could still access the interface). Isn't there supposed to be an "error" template that shows if your access is denied?

DSpeichert commented 7 years ago

I'm not sure. It's hard because of the different routers, that's why the package is split and you're not forced to use the UI at all. Maybe @gadicc can answer that, I don't really know the code that well anymore.