[ Index ]
 

Code source de CMS made simple 1.0.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/admin/lang/ -> addline.bat (source)

   1  @echo off
   2  
   3  IF "%1"=="" GOTO NoArgs
   4  IF "%2"=="" GOTO NoArgs
   5  find "$lang['admin']['%~1']" en_US/admin.inc.php > nul
   6  if errorlevel 1 goto newString
   7      echo "The variable $lang['admin']['%~1'] already exists"
   8      GOTO EOF
   9  
  10  :NoArgs
  11  echo usage: addline.bat "messagename" "new message text"
  12  echo Note: If you need to place quotes withen "new message text" they will be escaped automatically, so you do not need to worry about them.
  13  
  14  goto EOF
  15  
  16  :newString
  17  
  18  rem escaping quotes
  19  SET newString="%~2"
  20  SET newString=%newString:"=\"%
  21  SET newString=%newString:~1,-2%"
  22  
  23  for /R %%f in (*admin.inc.php) do findstr /v "?>" %%f > %%f.tmp
  24  for /R %%f in (*admin.inc.php) do echo $lang['admin']['%~1'] = %newString%; //needs translation >> %%f.tmp
  25  for /R %%f in (*admin.inc.php) do echo ?^> >> %%f.tmp
  26  for /R %%f in (*admin.inc.php) do move /Y %%f.tmp %%f
  27  
  28  :EOF


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7