Firefox附加说明本地化
我已经创建了简单的无重启Firefox插件,并尝试将其本地化。我无法本地化加载项名称和说明。我正试图按照这里描述的那样去做 下面是我的install.rdf文件和package.jsonFirefox附加说明本地化,firefox,localization,add-on,Firefox,Localization,Add On,我已经创建了简单的无重启Firefox插件,并尝试将其本地化。我无法本地化加载项名称和说明。我正试图按照这里描述的那样去做 下面是我的install.rdf文件和package.json { "name": "find_in_files", "title": "Find in files", "id": "{7DE613B7-54D9-4899-A018-861472402B2E}", "description": "Search for substri
{
"name": "find_in_files",
"title": "Find in files",
"id": "{7DE613B7-54D9-4899-A018-861472402B2E}",
"description": "Search for substring in files",
"author": "Vitaly Shulgin",
"license": "MPL 2.0",
"version": "1.1",
"unpack": "true",
"preferences": [
{
"name": "SearchDirectory",
"title": "Search directory",
"description": "You must specify it before search. Please, be patient - it may takes some time to index documents before search will return correct result.",
"type": "directory",
"value": ""
},
{
"name": "DefaultLocale",
"title": "Default language",
"description": "Default language to use when searching in non-unicode documents",
"type": "menulist",
"value": "ru-ru",
"options": [
{
"value": "en-us",
"label": "English"
},
{
"value": "ru-ru",
"label": "Russian"
}
]
},
{
"name": "OutputFileName",
"title": "Temporary output file name",
"description": "Temporary output file name",
"type": "string",
"value": "fif-result.html",
"hidden": true
}
]
}
package.json
{
"name": "find_in_files",
"title": "Find in files",
"id": "{7DE613B7-54D9-4899-A018-861472402B2E}",
"description": "Search for substring in files",
"author": "Vitaly Shulgin",
"license": "MPL 2.0",
"version": "1.1",
"unpack": "true",
"preferences": [
{
"name": "SearchDirectory",
"title": "Search directory",
"description": "You must specify it before search. Please, be patient - it may takes some time to index documents before search will return correct result.",
"type": "directory",
"value": ""
},
{
"name": "DefaultLocale",
"title": "Default language",
"description": "Default language to use when searching in non-unicode documents",
"type": "menulist",
"value": "ru-ru",
"options": [
{
"value": "en-us",
"label": "English"
},
{
"value": "ru-ru",
"label": "Russian"
}
]
},
{
"name": "OutputFileName",
"title": "Temporary output file name",
"description": "Temporary output file name",
"type": "string",
"value": "fif-result.html",
"hidden": true
}
]
}
install.rdf
<?xml version="1.0" encoding="utf-8" ?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>{7DE613B7-54D9-4899-A018-861472402B2E}</em:id>
<!-- begin localizaation -->
<em:localized>
<Description>
<em:locale>ru-Ru</em:locale>
<em:name>Поиск в файлах</em:name>
<em:description>Поиск выделенного текста в файлах</em:description>
</Description>
</em:localized>
<em:localized>
<Description>
<em:locale>en-Us</em:locale>
<em:name>Find in Files</em:name>
<em:description>Search for selected text in files</em:description>
</Description>
</em:localized>
<!-- em:name>Find in files</em:name -->
<!-- em:description>Search for selected text in files</em:description -->
<!-- end localizaation -->
<em:version>1.1</em:version>
<em:type>2</em:type>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!--Firefox-->
<em:minVersion>1.5</em:minVersion>
<em:maxVersion>3.0.*</em:maxVersion>
</Description>
</em:targetApplication>
<em:unpack>true</em:unpack>
<em:creator>Vitaly A. Shulgin</em:creator>
<em:targetPlatform>WINNT</em:targetPlatform>
</Description>
</RDF>
{7DE613B7-54D9-4899-A018-861472402B2E}
茹茹
Поиск в файлах
Поиск выделенного текста в файлах
恩美
在文件中查找
在文件中搜索所选文本
1.1
2.
{ec8030f7-c20a-464f-9b0e-13a3a9e97384}
1.5
3.0.*
符合事实的
维塔利A.舒尔金
温特
我做错了什么?答案是-如果项目文件夹中有install.rdf,来自mozilla插件sdk的命令“cfx xpi”将覆盖它。所以,为了让事情正常工作-创建xpi包,将其解压(解压)-您将在(!!!)中找到自动生成install.rdf,用自己的install.rdf替换install.rdf,并用zip命令重新打包xpi 就这些,伙计们