Mezzanine Translations

81 views
Skip to first unread message

Mario Osorio

unread,
Sep 24, 2013, 12:00:16 AM9/24/13
to mezzani...@googlegroups.com
Hello everyone.

I'm giving my first steps with django/mezzanine and was faced with the following:

I did not want the word blog to be shown in ANY of the pages. I am using an internacionalized version (es) so I grabbed the django.po file for my language and basically replaced all references to the terms 'blog' and 'blog entry' to 'news' and news article'.

After backing up the original .po and .mo files, I compiled the .po file in order to generate the .mo file and voila! it worked.

Of the many questions I had about internationalization I'm only left with 2 for the time being:

1) Is this the right approach? Of coursed I saved a copy of my .mo and .po files with my project so if I ever have the same need in a new project, I only have to backup and copy the translation files. BUT my worries are Shouldn't I be able to have my own blog app with my new translatiom and be able to include 'news' app instead of the original blog app??

and

2) How do I work it out so the URLs to my now called NEWS ARTICLES show the word NEWS (http://127.0.0.1:8000/news/news_article/) instead of BLOG (http://127.0.0.1:8000/blog/news_article/)? This could probably be one more and an even better reason to have my own 'news' app instead of the original blog app


TIA!!

Eduardo Rivas

unread,
Sep 24, 2013, 1:08:39 AM9/24/13
to mezzani...@googlegroups.com
I've done the same as you in the past and it works just fine. The blog url can be changed in the settings module by defining BLOG_SLUG = "news". Greetings!

Mario Osorio

unread,
Sep 24, 2013, 9:34:25 PM9/24/13
to mezzani...@googlegroups.com
Thanks Eduardo, you made my day; ¡muchas gracias!

Mario R. Osorio

unread,
Sep 25, 2013, 12:13:06 AM9/25/13
to mezzani...@googlegroups.com
You still made my day (about translation) BUT

I tried adding the BLOG_SLUG="noticias" and I did get the blog entries with that slug in the form "my.site/noticias/2013/..." BUT the man blog page was still called blog

Another one of my requirements is that My landing page be that of the blog/noticias, and reading and searching all over the unverse I found the following in urls.py:

    # HOMEPAGE FOR A BLOG-ONLY SITE
    # -----------------------------
    # This pattern points the homepage to the blog post listing page,
    # and is useful for sites that are primarily blogs. If you use this
    # pattern, you'll also need to set BLOG_SLUG = "" in your
    # ``settings.py`` module, and delete the blog page object from the
    # page tree in the admin if it was installed.

    # url("^$", "mezzanine.blog.views.blog_post_list", name="home"),

I thought that'd help so I followed instructions and:
  1. Did not work.
  2. never got a main blog/noticias page and
  3. was never ale to get it back either

For this and a couple other reasons (I don't know how to use git is one); tomorrow, with a fresh day ahead of me and (hopefully) without any hate for the world, I'll start the project again with the same database, hoping that all goes back to 'normal' (and use git from the beginning)


Any and all comments are welcome, TIA!
 



Dtb/Gby
=======
Mario R. Osorio
"... Begin with the end in mind ..."
http://www.google.com/profiles/nimbiotics


--
You received this message because you are subscribed to a topic in the Google Groups "Mezzanine Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mezzanine-users/0eRWyvzcQ2I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Josh Cartmell

unread,
Sep 25, 2013, 1:37:15 AM9/25/13
to mezzani...@googlegroups.com
Hey Mario besides editing the blog slug setting you should be able to open the blog page in the admin and edit it's title, etc....  If it doesn't exist just create a rich text page that has the same title as your chosen blog slug.


--
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com.

Mario Osorio

unread,
Sep 25, 2013, 3:37:12 PM9/25/13
to mezzani...@googlegroups.com
Thanks a lot Josh,

I did indeed get my blog'a home page back by following your instructions and its also using my chosen blog slug ... but it's still NOT my project's home page. How can I make that work?

TIA!

Josh Cartmell

unread,
Sep 25, 2013, 3:45:31 PM9/25/13
to mezzani...@googlegroups.com
Hey Mario I'm not exactly sure why your home page isn't showing blog posts.  What is it showing?

One quick thought, are all the other home page urls commented out? Django urls are evaluated in order and once one matches it stops searching so the original home page url would override if it wasn't commented out.

Mario R. Osorio

unread,
Sep 25, 2013, 3:55:17 PM9/25/13
to mezzani...@googlegroups.com
Yue were indeed right: I did not comment out the other urls

Thanks a BUNCH!


Dtb/Gby
=======
Mario R. Osorio
"... Begin with the end in mind ..."
http://www.google.com/profiles/nimbiotics


Reply all
Reply to author
Forward
0 new messages