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
no subject
no subject
...except my sanity, having been working nonstop on coding stuff since around 1AM. (For reference, it's 2PM right about now...) I think it might be time to take a break and go read some fic instead :P
no subject
Anyway, when you start working on it again, I'd like to poke at your dreahack a bit more, because there's something not quite right.
no subject
Anyway, Sophie's code (with some minor adjustments for context) did work for me, so it's all good!
no subject
no subject
no subject
no subject
no subject