Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the submission message of apostrophe-moderator #169

Closed
dannyblv opened this issue Oct 28, 2014 · 9 comments
Closed

Changing the submission message of apostrophe-moderator #169

dannyblv opened this issue Oct 28, 2014 · 9 comments

Comments

@dannyblv
Copy link

Hey guys, I wonder how can I change that message, I tried overide the file
node_modules/apostrophe-moderator/public/js/content.js into lib/modules/apostrophe-moderator/public/js/content.js and change that message, but I'm getting browser error Uncaught ReferenceError: MyModerator is not defined, so how can I overide this message ?

and btw, is here i18n for client side ?
if there is where do I define it ?

thanks.

@boutell
Copy link
Member

boutell commented Oct 28, 2014

Your friend Danny wrote the i18n support (: You should talk to him about
that aspect.

The message probably needs to come from the server in some way, we really
should switch to pushing a dictionary of i18n stuff via pushGlobalData so
that it's visible as apos.data.i18n. Unless that's what Danny already did...

On Tue, Oct 28, 2014 at 5:10 AM, Danny Braunstein [email protected]
wrote:

Hey guys, I wonder how can I change that message, I tried overide the file
node_modules/apostrophe-moderator/public/js/content.js into
lib/modules/apostrophe-moderator/public/js/content.js and change that
message, but I'm getting an error in the browser Uncaught ReferenceError:
MyModerator is not defined, so how can I overide this message ?

and btw, is here i18n for client side ?
if there is where do I define it ?

thanks.


Reply to this email directly or view it on GitHub
#169.

*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE | (215) 755-1330 | punkave.com

@dannyblv
Copy link
Author

Hm alright, but for now how can I override this alert ?

@boutell
Copy link
Member

boutell commented Oct 28, 2014

Right now, you can't. That needs fixing. Talk to Danny about how to make it
part of the i18n world; I know he did that for some other browser side
stuff.

On Tue, Oct 28, 2014 at 8:46 AM, Danny Braunstein [email protected]
wrote:

Hm alright, but for now how can I override this alert ?


Reply to this email directly or view it on GitHub
#169 (comment).

*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE | (215) 755-1330 | punkave.com

@dannyblv
Copy link
Author

@israelidanny

@etodanik
Copy link
Contributor

i18n for strings pushed to the frontend was a bit tricky since there wasn't a united mechanism to how they end up in the frontend.

I think I tried to push as many as possible, but it's somewhat a mess.

I'll look into it with @Danny-weebo

@benirose
Copy link
Contributor

Hi @Danny-weebo,

We don't have great support for apostrophe-moderator, but you can change this line if you overwrite the public\js\content.js file that apostrophe-moderator uses. It's on line 56 of the file that comes with it. Simply copy the contents of the file to lib/modules/apostrophe-moderator/public/js/content.js and change the string in the alert (or provide more elegant feedback).

Please create a ticket in that module for this feature, and feel free to submit a PR with code that allows for this to the apostrophe-moderator module.

@boutell
Copy link
Member

boutell commented Feb 21, 2015

Thanks Ben. Just to clarify, apostrophe-moderator is fully supported.

We should start pushing a dictionary of i18n strings JavaScript needs into
the browser via push.globalData in 0.6.

For now we could just move the string to a configuration option so you can
hit it from app.js. that would be easy to do.

Reopening because this is unresolved and we are using it in our own
projects.
On Feb 20, 2015 11:16 PM, "benirose" [email protected] wrote:

Closed #169 #169.


Reply to this email directly or view it on GitHub
#169 (comment).

@boutell boutell reopened this Feb 21, 2015
@jth- jth- added the 0.5 label Jan 28, 2016
@stuartromanek
Copy link
Member

Hey @boutell am, I correct in seeing that these messages can now be overridden here https://github.com/punkave/apostrophe-moderator#overriding-methods

(haven't gotten all the way to testing but it looks like what this issue is after)

@boutell
Copy link
Member

boutell commented Jun 19, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants