unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Daniel Sousa <daniel@sousa.me>
To: Doug Lewan <dougl@shubertticketing.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Help with emacs scripting
Date: Wed, 11 Apr 2012 01:22:50 +0100	[thread overview]
Message-ID: <CAKhc=u534x5vweAqi5CyKeR3_ouXrA97XAffzzjmO9dtJ3RsfA@mail.gmail.com> (raw)
In-Reply-To: <495248DFDEA08C469BBDED2D4AA6C61442552C@DAKIYA1.pegasus.local>

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]

On Tue, Apr 10, 2012 at 5:06 PM, Doug Lewan <dougl@shubertticketing.com>wrote:

> Daniel,
>
> This is probably not hard, but more information would be useful.
>
> . Are the .xsl and .php files similarly named? "bob.xsl" and "bob.php"?
>
I have a few .xsl files and all the define()'s go to the same .php file.

. Do you already have a regular expression to find the strings? Maybe you
> have a "good" sample of strings to look for.
>
Unfortunately I will have to look for the string manually


> . Does the location of the DEFINE() in the PHP file matter? Could it be
> replacing something else? (Or interfering with something else?)
>
We are creating a .php file that is basically only a lot of those defines,
then we send it to the translators and we have one of those files for each
language.


>
> ,Doug
>

Thank you very much for your attention.


>
>
>
> From: Daniel Sousa
> Sent: Monday, 2012 April 09 05:38
> To: help-gnu-emacs@gnu.org
> Subject: Help with emacs scripting
>
> I'm new to emacs and I have not used it much, but I think that it could
> really help me on the task I'm currently doing.
>
> I need to change a web app to make it translatable. Now I have to change a
> bunch of .xsl files. What I need to do is find the strings, then replace
> them by something like <xsl:value-of select="/xml/lang/foo" /> and add to a
> .php something like DEFINE("_LANG_FOO","bar");
>
> I think it would be really easy to create an emacs script to automatically
> do this, but I don't know how to do it. Can anyone help me?
>
> Best regards,
> Daniel Sousa
>

[-- Attachment #2: Type: text/html, Size: 2620 bytes --]

  reply	other threads:[~2012-04-11  0:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09  9:37 Help with emacs scripting Daniel Sousa
2012-04-10 16:06 ` Doug Lewan
2012-04-11  0:22   ` Daniel Sousa [this message]
2012-04-11 11:31 ` Le Wang
     [not found] <F326B9A37B353A449FC7A09B36835F82F4EDAA@MACE.sppdg.ad>
2012-04-12 16:10 ` Daniel Sousa
2012-04-12 16:36   ` Andreas Röhler
2012-04-13 13:56   ` Doug Lewan
2012-04-16  0:10     ` Daniel Sousa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKhc=u534x5vweAqi5CyKeR3_ouXrA97XAffzzjmO9dtJ3RsfA@mail.gmail.com' \
    --to=daniel@sousa.me \
    --cc=dougl@shubertticketing.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).