Closed Bug 1276702 Opened 9 years ago Closed 9 years ago

Enable Pontoon for https://advocacy.mozilla.org

Categories

(Webtools Graveyard :: Pontoon, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: thecount, Assigned: mathjazz)

Details

https://advocacy.mozilla.org has been setup to be localized vi Pontoon. Staging is here: https://advocacy-mozilla-org-staging.herokuapp.com/ and that is the endpoint that's setup to work with pontoon. Repo is here: https://github.com/mozilla/advocacy.mozilla.org Locale .properties files are here: https://github.com/mozilla/advocacy.mozilla.org/tree/master/locales Right now it's just en-US The repo has mozilla-pontoon set as a collaborator, the site should also allow domain pontoon.mozilla.org to do stuuff. Let me know if I missed anything or something's not working as expected :) I'm happy to fix it asap.
Assignee: nobody → m
Oh, almost forgot. Right now only the content under https://advocacy-mozilla-org-staging.herokuapp.com/en-US/encrypt/ has it's strings added to .properties In the next few weeks I intend to add more strings, but the initial idea is start with the /encrypt/ campaign files.
I'm seeing what might be a bug on staging. Error: Cannot find module "../public/locales.json" I'm trying to figure out what it is now. Doesn't happen locally.
Hi Scott, thanks for setting this up! I've set the project up on Pontoon stage and strings get imported correctly. I've only noticed one issue in the messages.properties file - there's a duplicate key (fellows=Fellows). I've also added a test locale to check if push works... And it does. I wasn't able to load the website inside Pontoon iframe, because it permits framing. Could you please check the CSP settings, so that loading inside iframe and loading remote CSS and images is permitted for domains pontoon.mozilla.org and mozilla-pontoon-staging.herokuapp.com? https://developer.mozilla.org/en-US/docs/Mozilla/Implementing_Pontoon_in_a_Mozilla_website#B._Enable_Pontoon_on_your_site As for the pages to translate - if it's not too much work, it would be helpful for localizers to have strings disposed in separate files for each page. One last thing - When should we enable the project on production and for what locales?
OK cool, updated the csp (I didn't get all the right permissions in my first attempt, should work now) I also removed the dupe key. I can move the strings into their own files based on the pages, I like that idea. Not sure if I'll get to that today. I think which locales and when when shoot to have it on prod is a question for @brett, who I'm ccing on this comment. Also, thanks!
Flags: needinfo?(brett)
Per our discussion, the locales required are de and es (generic Latam Spanish).
Scott, thanks for the fix! I'm still getting JS errors when trying to load the page inside Pontoon's iframe: https://mozilla-pontoon-staging.herokuapp.com/sl/mozilla-advocacy/messages.properties/ It should work like this: https://pontoon.mozilla.org/sl/fundraising/Homepage/
Awesome! Should be working now. I needed to add pontoon to something called frameguard, and not just the csp stuff. Still need to add more strings to the messages file and separate them into a file per page. Right now only the contents under /encrypt/ is in the messages file, along with the header in homepage as nothing more than a test.
Now that I can click around, I noticed I cannot figure out how to navigate to other pages. Seems the third nav item only shows messages.properties and the page is showing the home page. Is there something I'm missing to enable navigation? Do you need the properties files to be sorted per page to enable this?
Scott, I haven't set the subpages up yet. Could you give me list of links to subpages? Having per-page files is not mandatory for that, but it helps. If you click on the hamburger icon on top left, all strings that aren't found on the current page will be listed in the "Not on the current page" section. And that list will be much shorter if we have per-page files, because than we can link those files to subpages.
Yes! These are the URLs, though https://advocacy.mozilla.org/en-US/encrypt/signup/ is the priority for us right now. I'd like to be able to send to our localizers this weekend - so if we can turn on now it would be great, although I don't want to break any of our current URLs?
Flags: needinfo?(brett)
If a localizer translates on staging, is it possible to transfer this to production? What is best practice there.
OK, I've set the pages up, e.g.: https://mozilla-pontoon-staging.herokuapp.com/sl/mozilla-advocacy/Sign%20Up/ It would help if one could select the text that's positioned over the video. That way Pontoon would also allow you to select it, see: https://mozilla-pontoon-staging.herokuapp.com/sl/mozilla-advocacy/Direct%201/ Brett, we only use stage server for testing and to see if the project works with Pontoon before we enable it in production. Localizers will only work on pontoon.mozilla.org.
I missed a page we probably should have: https://advocacy.mozilla.org/en-US/encrypt/signup-complete I see there is an error being thrown in the console for just this page: https://mozilla-pontoon-staging.herokuapp.com/sl/mozilla-advocacy/Sign%20Up/ I'm going to try to track it down.
(In reply to Scott [:thecount] Downe from comment #14) > I missed a page we probably should have: > > https://advocacy.mozilla.org/en-US/encrypt/signup-complete Added. > I see there is an error being thrown in the console for just this page: > https://mozilla-pontoon-staging.herokuapp.com/sl/mozilla-advocacy/Sign%20Up/ > > I'm going to try to track it down. Yikes, that would be me. I used the production URL instead of stage.
I'm starting the process of splitting the .properties files. Are there any blockers here though?
Hey Matjz, question, once I start pasting strings in files and making new files, do I need to inform you of the new file names or does pontoon figure them out. As in, if I start mergind changes to files, is it going to break what's currently on staging?
Scott, just go ahead and add new files. Pontoon will import them on next sync. Once the project is enabled in production, then we need to be more careful when renaming files or moving strings between files. Otherwise translation attributions will be lost (translations themselves will be kept though). So if you want to rename files or move strings between files after we hit production, please ping me before doing so, so that I'll replicate those changes in Pontoon DB.
Hey Matjaz, Looks like we want to move this forward and get it onto production if there are no more blockers. I moved all the /encrypt/ strings into an encrypt.properties file. I'll be iterating on this in the future, so ongoing feedback is welcome :)
Flags: needinfo?(m)
Scott, I've added the project to production (it's hidden for now). I will enable it for de and es only. If other locales request to be added, we'll enable them. What should we do with the home.properties? Is there a page we can link it to or shall we just make it localizable out of context, e.g. like this: https://pontoon.mozilla.org/en-GB/fundraising/Snippets/?string=98321 If there's a short description you want to add to Pontoon, you can paste it here. Example: https://pontoon.mozilla.org/projects/fundraising/
Flags: needinfo?(m)
home.properties is just for https://advocacy.mozilla.org/ It's not fully done yet, but I started integrating it there as a test, and I figured leaving it was harmless. I'm planning on doing more pages in my down time or when requested. I'll ping Brett to add a short description. Thanks!
Is there a way to view hidden projects on production? Or does it take a bit before it's live still?
@matjaz how is this for a description: We Are Building a Global Movement to Protect the Free and Open Web We believe the Internet is at its best as a global public resource, open and accessible to all. We also believe a healthy Internet requires an active, global community. mozilla Advocacy brings together individuals from around the world to educate on and fight for privacy, inclusion and literacy online. Localization of Mozilla's advocacy efforts helps us fight for the internet in all corners of the globe. Also: how do I find these projects on production?
Scott, thanks for explaining this, I've added a separate page for home.properties without linking it to any page for now. I've also added the project description, which sounds great. Thanks, Brett! Project will be visible here: https://pontoon.mozilla.org/projects/mozilla-advocacy/ I need to unhide it first, which I'll do just before Peiying (NI) sends an announcement to the l10n mailing list later today. We try to avoid adding new projects before announcing them. And yes, we know this is more complex than it should be and we're working on making the process smoother. ;)
Flags: needinfo?(pmo)
Project enabled, but I'm getting a weird error in Firefox that prevents the iframe from loading: Load denied by X-Frame-Options: https://mozilla-pontoon-staging.herokuapp.com/ does not permit framing by https://pontoon.mozilla.org/de/mozilla-advocacy/Sign%20Up/. (unknown)
Looking
So it turns out the thing we're using to block iframe usage only lets us allow from one domain. Right now that's pontoon-staging. I'm trying to find a workaround.
Ok, in this case we can also replace it with pontoon prod. We don't need the project on stage anymore.
K, it's good now. Staging pontoon won't work, but like you said, that's probably fine for now.
Thanks. Pei, you can send the announcement.
This has been enabled and announced. Unsurprisingly, German was complete immediately.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(pmo)
Resolution: --- → FIXED
Blocks: 1280410
No longer blocks: 1280410
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.