Denise (
denise) wrote in
dw_dev_training2011-08-19 12:07 pm
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
![[site community profile]](https://www.dreamwidth.org/img/comm_staff.png)
*bangs head against translation system*
Scenario: I have a dw-nonfree file (cgi-bin/DW/Hooks/Community.pm) in which I want to reference text that is a mixture of both en_DW.dat (dw-nonfree version) and FAQs from en.dat (dw-free version). (Namely: I am referencing FAQs in the code, and would like the FAQ titles to automatically update in the page if they update on the site.)
I thought this would work:
However, although I do have a FAQ #17 on my 'hack, it comes up as:
[missing string 17.1question]
I'm suspecting it's because I need to declare the 'faq' scope instead of the 'general' scope, but can I intermingle things from faq and general? Is there an easier way to be doing what I want to do?
I thought this would work:
However, although I do have a FAQ #17 on my 'hack, it comes up as:
[missing string 17.1question]
I'm suspecting it's because I need to declare the 'faq' scope instead of the 'general' scope, but can I intermingle things from faq and general? Is there an easier way to be doing what I want to do?
no subject
If you want languages respected, then this is probably the right way to do it (with the first half of this pretty much directly copied from htdocs/support/faqbrowse.bml; the only thing I edited was taking away the detection of the ?lang= URL parameter):
Oh, you may want to make sure $faq actually exists too, thinking about it; if the FAQ isn't there then that code would fail when it tries to access 'question_html'.
no subject