Pas2JS: i18n-ed macros descriptions and some error messages; regenerated translations and updated Russian translation.

git-svn-id: trunk@61729 -
This commit is contained in:
maxim 2019-08-19 23:32:47 +00:00
parent b6065e6658
commit 6e68087f8a
11 changed files with 342 additions and 10 deletions

View File

@ -23,6 +23,25 @@ msgstr ""
msgid "Create initial HTML page"
msgstr ""
#: strpas2jsdesign.pjsddirectorynotfound
#, object-pascal-format
msgid "directory \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdfilenamedoesnotstartwithpas2js
msgid "filename does not start with \"pas2js\""
msgstr ""
#: strpas2jsdesign.pjsdfilenotexecutable
#, object-pascal-format
msgid "file \"%s\" not executable"
msgstr ""
#: strpas2jsdesign.pjsdfilenotfound
#, object-pascal-format
msgid "file \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdmaintainhtmlfile
msgid "Maintain HTML file"
msgstr ""
@ -31,6 +50,10 @@ msgstr ""
msgid "Maintain HTML page"
msgstr ""
#: strpas2jsdesign.pjsdmissingpathtopas2js
msgid "missing path to pas2js"
msgstr ""
#: strpas2jsdesign.pjsdnodejsappdescription
msgid "A pas2js program running in node.js"
msgstr "Un programme pas2js en cours d'exécution dans node.js"
@ -47,6 +70,22 @@ msgstr ""
msgid "Pas2JS Browser project options"
msgstr ""
#: strpas2jsdesign.pjsdpas2jscurrentprojecturl
msgid "Pas2JS current project URL"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsexecutable
msgid "Pas2JS executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectedbrowserexecutable
msgid "Pas2JS selected browser executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectednodejsexcutable
msgid "Pas2JS selected NodeJS excutable"
msgstr ""
#: strpas2jsdesign.pjsdpathof
#, object-pascal-format
msgid "Path of %s"

View File

@ -23,6 +23,25 @@ msgstr ""
msgid "Create initial HTML page"
msgstr ""
#: strpas2jsdesign.pjsddirectorynotfound
#, object-pascal-format
msgid "directory \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdfilenamedoesnotstartwithpas2js
msgid "filename does not start with \"pas2js\""
msgstr ""
#: strpas2jsdesign.pjsdfilenotexecutable
#, object-pascal-format
msgid "file \"%s\" not executable"
msgstr ""
#: strpas2jsdesign.pjsdfilenotfound
#, object-pascal-format
msgid "file \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdmaintainhtmlfile
msgid "Maintain HTML file"
msgstr ""
@ -31,6 +50,10 @@ msgstr ""
msgid "Maintain HTML page"
msgstr ""
#: strpas2jsdesign.pjsdmissingpathtopas2js
msgid "missing path to pas2js"
msgstr ""
#: strpas2jsdesign.pjsdnodejsappdescription
msgid "A pas2js program running in node.js"
msgstr "Fut egy pas2js program node.js-ben"
@ -47,6 +70,22 @@ msgstr ""
msgid "Pas2JS Browser project options"
msgstr ""
#: strpas2jsdesign.pjsdpas2jscurrentprojecturl
msgid "Pas2JS current project URL"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsexecutable
msgid "Pas2JS executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectedbrowserexecutable
msgid "Pas2JS selected browser executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectednodejsexcutable
msgid "Pas2JS selected NodeJS excutable"
msgstr ""
#: strpas2jsdesign.pjsdpathof
#, object-pascal-format
msgid "Path of %s"

View File

@ -13,6 +13,25 @@ msgstr ""
msgid "Create initial HTML page"
msgstr ""
#: strpas2jsdesign.pjsddirectorynotfound
#, object-pascal-format
msgid "directory \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdfilenamedoesnotstartwithpas2js
msgid "filename does not start with \"pas2js\""
msgstr ""
#: strpas2jsdesign.pjsdfilenotexecutable
#, object-pascal-format
msgid "file \"%s\" not executable"
msgstr ""
#: strpas2jsdesign.pjsdfilenotfound
#, object-pascal-format
msgid "file \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdmaintainhtmlfile
msgid "Maintain HTML file"
msgstr ""
@ -21,6 +40,10 @@ msgstr ""
msgid "Maintain HTML page"
msgstr ""
#: strpas2jsdesign.pjsdmissingpathtopas2js
msgid "missing path to pas2js"
msgstr ""
#: strpas2jsdesign.pjsdnodejsappdescription
msgid "A pas2js program running in node.js"
msgstr ""
@ -37,6 +60,22 @@ msgstr ""
msgid "Pas2JS Browser project options"
msgstr ""
#: strpas2jsdesign.pjsdpas2jscurrentprojecturl
msgid "Pas2JS current project URL"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsexecutable
msgid "Pas2JS executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectedbrowserexecutable
msgid "Pas2JS selected browser executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectednodejsexcutable
msgid "Pas2JS selected NodeJS excutable"
msgstr ""
#: strpas2jsdesign.pjsdpathof
#, object-pascal-format
msgid "Path of %s"

View File

@ -23,6 +23,25 @@ msgstr ""
msgid "Create initial HTML page"
msgstr ""
#: strpas2jsdesign.pjsddirectorynotfound
#, object-pascal-format
msgid "directory \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdfilenamedoesnotstartwithpas2js
msgid "filename does not start with \"pas2js\""
msgstr ""
#: strpas2jsdesign.pjsdfilenotexecutable
#, object-pascal-format
msgid "file \"%s\" not executable"
msgstr ""
#: strpas2jsdesign.pjsdfilenotfound
#, object-pascal-format
msgid "file \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdmaintainhtmlfile
msgid "Maintain HTML file"
msgstr ""
@ -31,6 +50,10 @@ msgstr ""
msgid "Maintain HTML page"
msgstr ""
#: strpas2jsdesign.pjsdmissingpathtopas2js
msgid "missing path to pas2js"
msgstr ""
#: strpas2jsdesign.pjsdnodejsappdescription
msgctxt "strpas2jsdesign.pjsdnodejsappdescription"
msgid "A pas2js program running in node.js"
@ -49,6 +72,22 @@ msgstr ""
msgid "Pas2JS Browser project options"
msgstr ""
#: strpas2jsdesign.pjsdpas2jscurrentprojecturl
msgid "Pas2JS current project URL"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsexecutable
msgid "Pas2JS executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectedbrowserexecutable
msgid "Pas2JS selected browser executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectednodejsexcutable
msgid "Pas2JS selected NodeJS excutable"
msgstr ""
#: strpas2jsdesign.pjsdpathof
#, object-pascal-format
msgid "Path of %s"

View File

@ -23,6 +23,25 @@ msgstr "Браузер для открытия страницы HTML"
msgid "Create initial HTML page"
msgstr "Создать первоначальную страницу HTML"
#: strpas2jsdesign.pjsddirectorynotfound
#, object-pascal-format
msgid "directory \"%s\" not found"
msgstr "каталог \"%s\" не найден"
#: strpas2jsdesign.pjsdfilenamedoesnotstartwithpas2js
msgid "filename does not start with \"pas2js\""
msgstr "имя файла не начинается с \"pas2js\""
#: strpas2jsdesign.pjsdfilenotexecutable
#, object-pascal-format
msgid "file \"%s\" not executable"
msgstr "файл \"%s\" не является исполнимым"
#: strpas2jsdesign.pjsdfilenotfound
#, object-pascal-format
msgid "file \"%s\" not found"
msgstr "файл \"%s\" не найден"
#: strpas2jsdesign.pjsdmaintainhtmlfile
msgid "Maintain HTML file"
msgstr "Поддерживать файл HTML"
@ -31,6 +50,10 @@ msgstr "Поддерживать файл HTML"
msgid "Maintain HTML page"
msgstr "Поддерживать страницу HTML"
#: strpas2jsdesign.pjsdmissingpathtopas2js
msgid "missing path to pas2js"
msgstr "отсутствует путь к pas2js"
#: strpas2jsdesign.pjsdnodejsappdescription
msgid "A pas2js program running in node.js"
msgstr "Программа pas2js, запускаемая в node.js"
@ -47,6 +70,22 @@ msgstr "Параметры проекта NodeJS"
msgid "Pas2JS Browser project options"
msgstr "Параметры проекта Pas2JS для браузера"
#: strpas2jsdesign.pjsdpas2jscurrentprojecturl
msgid "Pas2JS current project URL"
msgstr "Адрес текущего проекта Pas2JS"
#: strpas2jsdesign.pjsdpas2jsexecutable
msgid "Pas2JS executable"
msgstr "Исполнимый файл Pas2JS"
#: strpas2jsdesign.pjsdpas2jsselectedbrowserexecutable
msgid "Pas2JS selected browser executable"
msgstr "Выбранный исполнимый файл браузера для Pas2JS"
#: strpas2jsdesign.pjsdpas2jsselectednodejsexcutable
msgid "Pas2JS selected NodeJS excutable"
msgstr "Выбранный исполнимый файл NodeJS для Pas2JS"
#: strpas2jsdesign.pjsdpathof
#, object-pascal-format
msgid "Path of %s"

View File

@ -23,6 +23,25 @@ msgstr ""
msgid "Create initial HTML page"
msgstr ""
#: strpas2jsdesign.pjsddirectorynotfound
#, object-pascal-format
msgid "directory \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdfilenamedoesnotstartwithpas2js
msgid "filename does not start with \"pas2js\""
msgstr ""
#: strpas2jsdesign.pjsdfilenotexecutable
#, object-pascal-format
msgid "file \"%s\" not executable"
msgstr ""
#: strpas2jsdesign.pjsdfilenotfound
#, object-pascal-format
msgid "file \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdmaintainhtmlfile
msgid "Maintain HTML file"
msgstr ""
@ -31,6 +50,10 @@ msgstr ""
msgid "Maintain HTML page"
msgstr ""
#: strpas2jsdesign.pjsdmissingpathtopas2js
msgid "missing path to pas2js"
msgstr ""
#: strpas2jsdesign.pjsdnodejsappdescription
msgid "A pas2js program running in node.js"
msgstr "Node.js içinde çalışan bir pas2js programı"
@ -47,6 +70,22 @@ msgstr ""
msgid "Pas2JS Browser project options"
msgstr ""
#: strpas2jsdesign.pjsdpas2jscurrentprojecturl
msgid "Pas2JS current project URL"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsexecutable
msgid "Pas2JS executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectedbrowserexecutable
msgid "Pas2JS selected browser executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectednodejsexcutable
msgid "Pas2JS selected NodeJS excutable"
msgstr ""
#: strpas2jsdesign.pjsdpathof
#, object-pascal-format
msgid "Path of %s"

View File

@ -25,6 +25,25 @@ msgstr ""
msgid "Create initial HTML page"
msgstr ""
#: strpas2jsdesign.pjsddirectorynotfound
#, object-pascal-format
msgid "directory \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdfilenamedoesnotstartwithpas2js
msgid "filename does not start with \"pas2js\""
msgstr ""
#: strpas2jsdesign.pjsdfilenotexecutable
#, object-pascal-format
msgid "file \"%s\" not executable"
msgstr ""
#: strpas2jsdesign.pjsdfilenotfound
#, object-pascal-format
msgid "file \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdmaintainhtmlfile
msgid "Maintain HTML file"
msgstr ""
@ -33,6 +52,10 @@ msgstr ""
msgid "Maintain HTML page"
msgstr ""
#: strpas2jsdesign.pjsdmissingpathtopas2js
msgid "missing path to pas2js"
msgstr ""
#: strpas2jsdesign.pjsdnodejsappdescription
msgid "A pas2js program running in node.js"
msgstr "Програма pas2js, що запускається в node.js"
@ -49,6 +72,22 @@ msgstr ""
msgid "Pas2JS Browser project options"
msgstr ""
#: strpas2jsdesign.pjsdpas2jscurrentprojecturl
msgid "Pas2JS current project URL"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsexecutable
msgid "Pas2JS executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectedbrowserexecutable
msgid "Pas2JS selected browser executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectednodejsexcutable
msgid "Pas2JS selected NodeJS excutable"
msgstr ""
#: strpas2jsdesign.pjsdpathof
#, object-pascal-format
msgid "Path of %s"

View File

@ -24,6 +24,25 @@ msgstr ""
msgid "Create initial HTML page"
msgstr ""
#: strpas2jsdesign.pjsddirectorynotfound
#, object-pascal-format
msgid "directory \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdfilenamedoesnotstartwithpas2js
msgid "filename does not start with \"pas2js\""
msgstr ""
#: strpas2jsdesign.pjsdfilenotexecutable
#, object-pascal-format
msgid "file \"%s\" not executable"
msgstr ""
#: strpas2jsdesign.pjsdfilenotfound
#, object-pascal-format
msgid "file \"%s\" not found"
msgstr ""
#: strpas2jsdesign.pjsdmaintainhtmlfile
msgid "Maintain HTML file"
msgstr ""
@ -32,6 +51,10 @@ msgstr ""
msgid "Maintain HTML page"
msgstr ""
#: strpas2jsdesign.pjsdmissingpathtopas2js
msgid "missing path to pas2js"
msgstr ""
#: strpas2jsdesign.pjsdnodejsappdescription
msgid "A pas2js program running in node.js"
msgstr "一个pas2js程序运行在node.js"
@ -48,6 +71,22 @@ msgstr ""
msgid "Pas2JS Browser project options"
msgstr ""
#: strpas2jsdesign.pjsdpas2jscurrentprojecturl
msgid "Pas2JS current project URL"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsexecutable
msgid "Pas2JS executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectedbrowserexecutable
msgid "Pas2JS selected browser executable"
msgstr ""
#: strpas2jsdesign.pjsdpas2jsselectednodejsexcutable
msgid "Pas2JS selected NodeJS excutable"
msgstr ""
#: strpas2jsdesign.pjsdpathof
#, object-pascal-format
msgid "Path of %s"

View File

@ -88,7 +88,7 @@ Const
implementation
uses FileUtil, LazFileUtils, PJSDsgnOptions;
uses FileUtil, LazFileUtils, PJSDsgnOptions, strpas2jsdesign;
Var
ctrl : TPJSController;
@ -331,10 +331,14 @@ end;
procedure TPJSController.Hook;
begin
IDEMacros.Add(TTransferMacro.Create('Pas2JS','','Pas2JS executable',@GetPas2JSPath,[]));
IDEMacros.Add(TTransferMacro.Create('Pas2JSBrowser','','Pas2JS selected Browser executable',@GetPas2JSBrowser,[]));
IDEMacros.Add(TTransferMacro.Create('Pas2JSNodeJS','','Pas2JS selected NodeJS excutable',@GetPas2JSNodeJS,[]));
IDEMacros.Add(TTransferMacro.Create('Pas2JSProjectURL','','Pas2JS current project URL',@GetPas2jsProjectURL,[]));
IDEMacros.Add(TTransferMacro.Create('Pas2JS', '', pjsdPas2JSExecutable, @
GetPas2JSPath, []));
IDEMacros.Add(TTransferMacro.Create('Pas2JSBrowser', '',
pjsdPas2JSSelectedBrowserExecutable, @GetPas2JSBrowser, []));
IDEMacros.Add(TTransferMacro.Create('Pas2JSNodeJS', '',
pjsdPas2JSSelectedNodeJSExcutable, @GetPas2JSNodeJS, []));
IDEMacros.Add(TTransferMacro.Create('Pas2JSProjectURL', '',
pjsdPas2JSCurrentProjectURL, @GetPas2jsProjectURL, []));
LazarusIDE.AddHandlerOnRunWithoutDebugInit(@MaybeStartServer);
end;

View File

@ -96,6 +96,9 @@ function GetPas2jsQuality(Filename: string; out Msg: string): boolean;
implementation
uses
strpas2jsdesign;
function GetStandardPas2jsExe: string;
begin
Result:=PJSDefaultCompiler;
@ -148,24 +151,24 @@ begin
Msg:='';
Filename:=TrimFilename(Filename);
if (Filename='') then begin
Msg:='missing path to pas2js';
Msg:=pjsdMissingPathToPas2js;
exit(false);
end;
if not FileExistsCached(Filename) then begin
Msg:='file "'+Filename+'" not found';
Msg:=Format(pjsdFileNotFound, [Filename]);
exit(false);
end;
if not DirPathExistsCached(ExtractFilePath(Filename)) then begin
Msg:='directory "'+ExtractFilePath(Filename)+'" not found';
Msg:=Format(pjsdDirectoryNotFound, [ExtractFilePath(Filename)]);
exit(false);
end;
if not FileIsExecutable(Filename) then begin
Msg:='file "'+Filename+'" not executable';
Msg:=Format(pjsdFileNotExecutable, [Filename]);
exit(false);
end;
ShortFile:=ExtractFileNameOnly(Filename);
if not CompareText(LeftStr(ShortFile,length('pas2js')),'pas2js')<>0 then begin
Msg:='file name does not start with "pas2js"';
Msg:=pjsdFileNameDoesNotStartWithPas2js;
exit(false);
end;
// run it

View File

@ -73,6 +73,19 @@ Resourcestring
pjsdNodeJSProjectOptions = 'NodeJS project options';
pjsdUseNodeJSApplicationObject = 'Use NodeJS Application object';
// Macros names
pjsdPas2JSExecutable = 'Pas2JS executable';
pjsdPas2JSSelectedBrowserExecutable = 'Pas2JS selected browser executable';
pjsdPas2JSSelectedNodeJSExcutable = 'Pas2JS selected NodeJS excutable';
pjsdPas2JSCurrentProjectURL = 'Pas2JS current project URL';
// Error descriptions
pjsdMissingPathToPas2js = 'missing path to pas2js';
pjsdFileNotFound = 'file "%s" not found';
pjsdDirectoryNotFound = 'directory "%s" not found';
pjsdFileNotExecutable = 'file "%s" not executable';
pjsdFileNameDoesNotStartWithPas2js = 'filename does not start with "pas2js"';
implementation
end.