Re: Javascript string catalogs (jsi18n) - accessing strings in project/locale?
Wow - I think you just fixed my problem! Awesome. Thanks! On Jul 12, 4:57 pm, Jari Pennanenwrote: > Hi, I know this comes late, but for the future reference: > > My problem was that I had "locale" directory in *project* directory, > "myproject/locale" but I didn't have myproject in INSTALLED_APPS. > > So the thing that contains localization strings *must* be ALSO in the > INSTALLED_APPS = [..., 'myproject'] > > On 8 kesä, 16:13, Stodge wrote: > > > > > I ran makemessages -d djangojs from my project level directory, and > > Django automatically generated the .po file in project/locale/. I > > followed the documentation (and the book The Definitive Guide to > > Django) but I cannot access these translated strings. The catalog is > > always empty. My urls contains: > > > js_info_dict = { > > 'packages': ('django.conf',), > > > } > > > But this doesn't work. I tried: > > > js_info_dict = { > > 'packages': ('project_name',), > > > } > > > As this is package name for the project directory, but no dice. So how > > do I access the strings in my project directory? > > > Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Javascript string catalogs (jsi18n) - accessing strings in project/locale?
Hi, I know this comes late, but for the future reference: My problem was that I had "locale" directory in *project* directory, "myproject/locale" but I didn't have myproject in INSTALLED_APPS. So the thing that contains localization strings *must* be ALSO in the INSTALLED_APPS = [..., 'myproject'] On 8 kesä, 16:13, Stodgewrote: > I ran makemessages -d djangojs from my project level directory, and > Django automatically generated the .po file in project/locale/. I > followed the documentation (and the book The Definitive Guide to > Django) but I cannot access these translated strings. The catalog is > always empty. My urls contains: > > js_info_dict = { > 'packages': ('django.conf',), > > } > > But this doesn't work. I tried: > > js_info_dict = { > 'packages': ('project_name',), > > } > > As this is package name for the project directory, but no dice. So how > do I access the strings in my project directory? > > Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Javascript string catalogs (jsi18n) - accessing strings in project/locale?
I even defined this in settings.py but it still doesn't work: LOCALE_PATHS=( os.path.join(os.path.abspath(os.path.dirname(__file__)), 'locale'), ) On Jun 8, 9:13 am, Stodgewrote: > I ran makemessages -d djangojs from my project level directory, and > Django automatically generated the .po file in project/locale/. I > followed the documentation (and the book The Definitive Guide to > Django) but I cannot access these translated strings. The catalog is > always empty. My urls contains: > > js_info_dict = { > 'packages': ('django.conf',), > > } > > But this doesn't work. I tried: > > js_info_dict = { > 'packages': ('project_name',), > > } > > As this is package name for the project directory, but no dice. So how > do I access the strings in my project directory? > > Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.