wyntarvox (
wyntarvox) wrote in
dw_dev_training2009-05-16 04:44 pm
Entry tags:
English Stripping and JavaScript
I've seen this come up a couple times in comments on Bugzilla, so I figured I'd ask here.
On a few pages that I know of, there's user-facing text that gets printed by included JavaScript files rather than in the BML files, so (unless I'm mistaken) they can't be English-stripped. Is the general procedure here to leave the copy un-stripped, but update it to be DW-consistent?
For example, manage/tags.bml uses "friends" under "counts and security" which should obviously be updated to "trusted". This would be easy to do just to manually change it, but is there perhaps a way to English strip these kinds of things?
On a few pages that I know of, there's user-facing text that gets printed by included JavaScript files rather than in the BML files, so (unless I'm mistaken) they can't be English-stripped. Is the general procedure here to leave the copy un-stripped, but update it to be DW-consistent?
For example, manage/tags.bml uses "friends" under "counts and security" which should obviously be updated to "trusted". This would be easy to do just to manually change it, but is there perhaps a way to English strip these kinds of things?
no subject
To show what I mean: If you look at the homepage while logged out, you'll notice this code in the source:
<script type="text/javascript"> var ml = new Object(); ml.joinheading = "Join Dreamwidth"; ml.entercode = "Enter your invite code:"; ml.usecode = "Use Code"; ml.cancel = "Cancel";In the actual JavaScript file, I can then refer to these strings as
ml.usecodeand such. In the original BML, I print it like this:$headextra .= <<HEAD; <script type="text/javascript"> var ml = new Object(); HEAD $headextra .= " ml.joinheading = \"" . BML::ml( ".create.join_dreamwidth", { sitename => $LJ::SITENAMESHORT } ) . "\";\n"; $headextra .= <<HEAD; ml.entercode = "$ML{'.create.enter_code'}"; ml.usecode = "$ML{'.create.use_code'}"; ml.cancel = "$ML{'.create.cancel'}"; HEADOf course, you need to know how to code it this way, which limits it, really. I don't think anybody would expect someone to English-strip *this* much if they didn't know how, so it might just work to change the words. May want to ask about that though.
[edited multiple times to fix stuff. So sorry about the edit spam. :(]
no subject
no subject
Thanks!