Précédent   Forum du club des développeurs et IT Pro > Webmasters - Développement Web > Outils > Autres
Autres Forum d'entraide sur les autres éditeurs et EDI pour le développement Web
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 14/06/2012, 16h41   #1
VSEB33
Futur Membre du Club
 
Inscription : septembre 2007
Messages : 51
Détails du profil
Informations forums :
Inscription : septembre 2007
Messages : 51
Points : 18
Points : 18
Par défaut [Notepad++] modification de syntaxe langue (xml)

Bonsoir à tous,

Je cherche à modifier un .xml afin de personnaliser la syntaxe pour faciliter un travail de traduction avec les possibilités suivantes :

- surligner d'une couleur les phrases à traduire qui sont entre " "
- ne pas surligner les phrases entre + + qui ne sont pas à traduire même s'ils sont à côté des " "
- surligner les messages de types debug / messagebox
- surligner d'une couleur les lignes de code qui sont entre ;BEGIN et ;END qui ne doivent surtout pas être traduit
- les commentaires { } et ; d'une couleur

Voici le fichier .xml pour la syntaxe :
http://www.creationkit.com/Notepad%2...x_Highlighting

Merci beaucoup de votre aide.

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<NotepadPlus>
    <UserLang name="Papyrus" ext="psc">
        <Settings>
            <Global caseIgnored="yes" />
            <TreatAsSymbol comment="yes" commentLine="yes" />
            <Prefix words1="no" words2="no" words3="no" words4="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Delimiters">&quot;00&quot;00</Keywords>
            <Keywords name="Folder+">Event</Keywords>
            <Keywords name="Folder-">EndEvent</Keywords>
            <Keywords name="Operators">- ! % &amp; ( ) * , . / [ ] | + &lt; = &gt;</Keywords>
            <Keywords name="Comment">1{ 2} 0;</Keywords>
            <Keywords name="Words1">abs</Keywords>
            <Keywords name="Words2">OnActivate</Keywords>
            <Keywords name="Words3">Action</Keywords>
            <Keywords name="Words4">As</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD1" styleID="5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD2" styleID="6" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD3" styleID="7" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD4" styleID="8" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="COMMENT" styleID="1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="3" />
            <WordsStyle name="COMMENT LINE" styleID="2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="2" />
            <WordsStyle name="NUMBER" styleID="4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="DELIMINER1" styleID="14" fgColor="000000" bgColor="FFFF00" fontName="" fontStyle="2" />
            <WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
        </Styles>
    </UserLang>
</NotepadPlus>
VSEB33 est déconnecté   Envoyer un message privé Réponse avec citation 01
Vieux 03/07/2012, 17h36   #2
chaparo
Membre habitué
 
Homme Vincent Bonnel
Apprenti Ingénieur
Inscription : avril 2012
Messages : 76
Détails du profil
Informations personnelles :
Nom : Homme Vincent Bonnel
Âge : 22
Localisation : France

Informations professionnelles :
Activité : Apprenti Ingénieur
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : avril 2012
Messages : 76
Points : 138
Points : 138
Bonjour,

Je me permet de faire remonter ce post, savez vous s'il est possible d'effectuer des regex sur ces chose.

Exemple dans mon cas :
Code :
1
2
3
4
5
  
            <Keywords name="Folder+">prsch prtbl PDB</Keywords>
            <Keywords name="Folder-">MARKER; HIDxDEN; ONLY; PRT_LOAD_EARLIEST_TIME; PREVIOUS; INTEGER; RGB; &#x00A4;{)}; ;&#x000D;&#x000A;</Keywords>
            <Keywords name="Operators">&quot; ( ) , . =</Keywords>
            <Keywords name="Comment">1 2 0;</Keywords>
le ; fais aussi bien office de symbole de commentaire que de "Folder-"
mais sur le Folder- il y aura toujours du texte avant le ;

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Operation Attribute 3,"Operation Attribute 3.prtbl",0,500:
      Number,0,INTEGER,
         HELPPOPUPID (14010)
         PRIMARY KEY
         HIDDEN:
      Name,1,STRING,
         HELPPOPUPID (21300)
         UNIQUE
         FREE FORMAT(20):
;      Attribute 3 Ranking Value,1,INTEGER,
;         HELPPOPUPID (21310)
;         HIDDEN IF 100
;         HIDDEN IF 200
;         HIDDEN IF 300:      
     Import Marker,-1,INTEGER,
         DIALOG LEVEL 99
         DIALOG ONLY
         READ ONLY
         IMPORT MARKER;
;
;
Mon Folder+ commence avec prtbl à la première ligne
Mon Folder- devrait se terminer à la ligne IMPORT MARKER;

en gros mon regex serait du style \*;&#x000D;&#x000A;\\

je ne suis pas un expert en regex mais ça correspondrait à : montexte;crlf

Dites moi si je ne suis pas très clair.
chaparo est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 13h47.


 
 
 
 
Partenaires

Hébergement Web