From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- files/tr/mozilla/add-ons/sdk/index.html | 81 ------ files/tr/mozilla/add-ons/sdk/tools/index.html | 14 - .../add-ons/sdk/tools/package_json/index.html | 323 --------------------- .../sdk/tutorials/getting_started_(jpm)/index.html | 174 ----------- files/tr/mozilla/add-ons/sdk/tutorials/index.html | 158 ---------- 5 files changed, 750 deletions(-) delete mode 100644 files/tr/mozilla/add-ons/sdk/index.html delete mode 100644 files/tr/mozilla/add-ons/sdk/tools/index.html delete mode 100644 files/tr/mozilla/add-ons/sdk/tools/package_json/index.html delete mode 100644 files/tr/mozilla/add-ons/sdk/tutorials/getting_started_(jpm)/index.html delete mode 100644 files/tr/mozilla/add-ons/sdk/tutorials/index.html (limited to 'files/tr/mozilla/add-ons') diff --git a/files/tr/mozilla/add-ons/sdk/index.html b/files/tr/mozilla/add-ons/sdk/index.html deleted file mode 100644 index 0cfe0d7301..0000000000 --- a/files/tr/mozilla/add-ons/sdk/index.html +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Add-on SDK -slug: Mozilla/Add-ons/SDK -translation_of: Archive/Add-ons/Add-on_SDK ---- -

Add-on SDK ile standart web teknolojilerini kullanarak Firefox eklentileri üretebilirsiniz. SDK, eklentileri yaratabileceğiniz JavaScript API'lerini ve eklentileri oluşturma, çalıştırma, test etme ve paketleme araçlarını içerir.

- -
-

Öğreticiler

- -
- - -
-
-
Kullanıcı arayüzü üretme bileşenleri
-
Kullanıcı arayüzü birimlerini yaratın. Mesela  araç çubuğu butonları, içerik menüleri, menü nesneleri ve iletiler.
-
Web sayfalarını modifiye edin.
-
Modify pages matching a URL pattern or dynamically modify a particular tab.
-
Putting it together
-
Walkthrough of the Annotator example add-on.
-
-
-
- -
-

Guides

- -
-
-
-
Contributor's guide
-
Learn how to start contributing to the SDK, and about the most important idioms used in the SDK code, such as modules, classes and inheritance, private properties, and content processes.
-
SDK infrastructure
-
Aspects of the SDK's underlying technology: modules, the Program ID, and the rules defining Firefox compatibility.
-
Content scripts
-
A detailed guide to working with content scripts.
-
-
- -
-
-
SDK idioms
-
The SDK's event framework and the distinction between add-on scripts and content scripts.
-
XUL migration
-
A guide to porting XUL add-ons to the SDK. This guide includes a comparison of the two toolsets and a working example of porting a XUL add-on.
-
Multiprocess Firefox and the SDK
-
How to check whether your add-on is compatible with multiprocess Firefox, and fix it if it isn't.
-
-
-
- -
-

Reference

- -
-
-
-
High-Level APIs
-
Reference documentation for the high-level SDK APIs.
-
Tools reference
-
Reference documentation for the jpm tool used to develop, test, and package add-ons, the console global used for logging, and the package.json file.
-
-
- -
-
-
Low-Level APIs
-
Reference documentation for the low-level SDK APIs.
-
-
-
diff --git a/files/tr/mozilla/add-ons/sdk/tools/index.html b/files/tr/mozilla/add-ons/sdk/tools/index.html deleted file mode 100644 index 8c67b4644e..0000000000 --- a/files/tr/mozilla/add-ons/sdk/tools/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Tools -slug: Mozilla/Add-ons/SDK/Tools -tags: - - Add-on SDK - - CFX - - JPM - - NeedsTranslation - - TopicStub -translation_of: Archive/Add-ons/Add-on_SDK/Tools ---- -

Articles listed here provide a reference for the SDK's tools:

- -

{{ LandingPageListSubpages ("/en-US/Add-ons/SDK/Tools", 7) }}

diff --git a/files/tr/mozilla/add-ons/sdk/tools/package_json/index.html b/files/tr/mozilla/add-ons/sdk/tools/package_json/index.html deleted file mode 100644 index 7b395a2fa1..0000000000 --- a/files/tr/mozilla/add-ons/sdk/tools/package_json/index.html +++ /dev/null @@ -1,323 +0,0 @@ ---- -title: package.json -slug: Mozilla/Add-ons/SDK/Tools/package_json -translation_of: Archive/Add-ons/Add-on_SDK/Tools/package_json ---- -

{{AddonSidebar}}

- -

package.json dosyası eklentiniz için manifesto görevi görür, sadece Add-ons Manager'daki (Eklenti Yöneticisi) sunum için betimleyici bilgileri değil, eklentiniz için diğer gerekli meta bilgilerini de içerir.

- -

Some of its entries, such as icon, name, and description, have direct analogues in the install manifest format, and entries from package.json are written into the install manifest when the add-on is built using jpm xpi.

- -

Others, such as lib, permissions, and preferences, represent instructions to the jpm tool itself to generate and include particular code and data structures in your add-on.

- -

Manifest oluşturma

- -

The package.json file is initially generated in your add-on's root directory the first time you run jpm init. It looks like this (assuming the add-on's directory is "my-addon"):

- -
{
-  "name": "my-addon",
-  "title": "my-addon",
-  "id": "jid1-1FERGV45e4f4f",
-  "description": "a basic add-on",
-  "author": "",
-  "license": "MPL-2.0",
-  "version": "0.1"
-}
- -

If you are using the new jpm tool, you can easily access manifest data from package.json by requiring it like any other module:

- -
var title = require("./package.json").title;
- -

Key reference

- -

package.json may contain the following keys:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
author -

The name of the package's original author; this could be the name of a person or a company. Defaults to an empty string. It may include a optional URL in parentheses and an email address in angle brackets.

- -

This value will be used as the add-on's em:creator element in the install.rdf file generated by cfx.

- -
Note: jpm supports NodeJS people fields.
-
contributors -

An array of additional author strings, identifying other contributors to the add-on.

- -

These values will be used as the add-on's em:contributor elements in its install.rdf.

- -
Note: This is deprecated along with cfx; it's not available when using jpm.
-
dependencies -

A string or an array of strings specifying the names of packages that this add-on requires in order to function properly.

-
description -

The add-on's description; this is a human-readable message describing what the add-on does. This defaults to the text "a basic add-on".

- -

This value will be used as the add-on's em:description element in its install.rdf.

-
engines -

Object with supported applications (key) and required version numbers (value). The version number can both specify a minimum and maximum version separated by a space.

- -
    -
  • firefox: Firefox Desktop
  • -
  • fennec: Firefox for Android
  • -
  • thunderbird: Thunderbird
  • -
  • seamonkey: SeaMonkey
  • -
  • Any application UUID
  • -
- -

Example:

- -
-  "engines": {
-    "firefox": ">=38.0a1",
-    "fennec": ">=38.0a1"
-  }
-
fullName {{deprecated_inline}} -
Note: This is deprecated along with cfx; it's not available when using jpm.
- -

The full name of the package. It can contain spaces.

- -

If this key is present, its value will be used as the add-on's em:name element in its install.rdf.

-
harnessClassID {{deprecated_inline}} -
Note: This is deprecated along with cfx; it's not available when using jpm.
- -

String in the GUID format.

- -

This is used as a classID of the "harness service" XPCOM component. Defaults to a random GUID generated by cfx.

-
homepage -

The URL of the add-on's website.

- -

This value will be used as the add-on's em:homepageURL element in its install.rdf.

-
icon -

The path to an image file containing the icon for the add-on. Optional: you can have no icon field in package.json and put your icon named "icon.png" in the root directory of your add-on. If no icon is specified, the standard add-on icon will be used by default.

- -
-

When using jpm, using a relative path to the data directory (to make it re-usable for add-on HTML content) does not work.

- -

You can generate the URL to your add-on icon in the data directory using the URL format below, where "your-addon-name" is the value in the name field of package.json.

- -

resource://@your-addon-name/data/your-icon-name.png

-
- -

This value will be used as the add-on's em:iconURL element in its install.rdf.

- -

The icon may be up to 48x48 pixels in size. A larger icon is will work, but may either scaled and possibly distorted) or might break parts of Firefox UI. (If you test this, please add the result here.)

- -

This can also be an object with the image size as key and the (absolute) location of the image as value. JPM looks for the sizes 64, 48 and 32.

-
icon64 {{deprecated_inline}} -
-

Note: This is deprecated along with cfx; it's not available when using jpm.

-
- -

The path to an image containing the large icon for the add-on. Defaults to icon64.png. If you don't provide an icon here, the same icon as specified by icon will be used.

- -

This value will be used as the add-on's em:icon64URL element in its install.rdf.

- -

The icon may be up to 64x64 pixels in size.

-
id -

A globally unique identifier for the add-on.

- -

This value will be used as the add-on's em:id element in its install.rdf.

- -

See the Program ID documentation.

-
lib -

String representing the top-level module directory provided in this add-on. Defaults to "lib".

- -
-

Note: This is deprecated along with cfx and is not available when using jpm.

-
-
license -

The name of the license under which the add-on is distributed, with an optional URL in parentheses. Defaults to "MPL-2.0".

- -
-

Note: It is recommended that you use an SPDX license ID.

-
-
locales -

An object holding JSON objects referenced by a locale name that use the following keys: title, description and homepage. These JSON objects will be used to localizations for the add-on's meta data shown within the Add-ons Manager.

- -

See the documentation for how to localize the add-on's meta data.

-
main -

A string representing the name of a program module that is located in one of the top-level module directories specified by lib. Defaults to "index.js".

-
name -

The add-on's name. This name cannot contain spaces or periods, and defaults to the name of the parent directory.

- -

When the add-on is built as an XPI, if the fullName and title keys are not present, name is used as the add-on's em:name element in its install.rdf.

-
packages -
-

Note: This is deprecated along with cfx and is not available when using jpm.

-
- -

A string pointing to a directory containing additional packages. Defaults to "packages".

-
permissions -

A set of permissions that the add-on needs.

- -

private-browsing: a boolean indicating whether or not the add-on supports private browsing. If this value is not true or is omitted, then the add-on will not see any private windows or objects, such as tabs, that are associated with private windows. See the documentation for the private-browsing module.

- -

cross-domain-content: a list of domains for which content scripts are given cross-domain privileges to access content in iframes or to make XMLHTTPRequests. See the documentation for enabling cross-domain content scripts.

- -

multiprocess: a Boolean value declaring whether this add-on is, or is not, compatible with multiprocess Firefox.

- -
-

Note the multiprocess permission is not supported by cfx.

-
-
preferences -

An array of JSON objects that use the following keys: name,type, value, title, and description. These JSON objects will be used to create a preferences interface for the add-on in the Add-ons Manager.

- -

See the documentation for the simple-prefs module.

-
preferences-branchUse this to specify an alternative branch for your add-on's simple-prefs. See "Simple-prefs in the preferences system" for more details.
title -

The human-readable title of the package; this can contain spaces.

- -

If this key is present, its value will be used as the add-on's em:name element in its install.rdf.

-
translators -

An array of strings listing the people who contributed to the localization of this add-on.

- -

These values will be used as the add-on's em:translator elements in its install.rdf.

- -
Note: jpm supports NodeJS people fields.
-
unpack -

Same as the unpack in an install.rdf file.

- -

Useful when the extension contains binaries.

-
updateKey -

Same as the updateKey in an install.rdf file.

- -

See Supporting updates for self-hosted add-ons.

- -
-

Note: This key is only available with jpm.

-
-
-

Same as the updateLink for an update.rdf file. Previously was --update-link in cfx.

- -

See Supporting updates for self-hosted add-ons.

- -
-

Note: This key is only available with jpm.

-
-
updateURL -

Same as the updateURL for an install.rdf file.

- -

See Supporting updates for self-hosted add-ons.

- -
-

Note: This key is only available with jpm.

-
-
version -

String representing the version of the add-on. Defaults to "0.0.1".

- -

This value is used as the add-on's em:version element in its install.rdf.

- -
-

Note: For jpm the version must be a valid semver.

-
-
- -

 

diff --git a/files/tr/mozilla/add-ons/sdk/tutorials/getting_started_(jpm)/index.html b/files/tr/mozilla/add-ons/sdk/tutorials/getting_started_(jpm)/index.html deleted file mode 100644 index 20e08ba28f..0000000000 --- a/files/tr/mozilla/add-ons/sdk/tutorials/getting_started_(jpm)/index.html +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: Başlarken(jpm) -slug: Mozilla/Add-ons/SDK/Tutorials/Getting_Started_(jpm) -translation_of: Archive/Add-ons/Add-on_SDK/Tutorials/Getting_Started_(jpm) ---- -

{{AddonSidebar}}

- -
-

The Add-on SDK includes a command-line tool that you use to initialize, run, test, and package add-ons. The current tool is called jpm, and is based on Node.js. It replaces the old cfx tool.

- -

You can use jpm from Firefox 38 onwards.

- -

This article describes how to develop using jpm.

-
- -

This tutorial walks through creating a simple add-on using the SDK.

- -

Ön koşullar

- -

SDK kullanarak Firefox eklentisi oluşturmak için şu şartların sağlanması gerekir:

- - - -

Boş bir eklenti başlatma

- -

Komut satırında, yeni bir dizin oluşturun. Dizine gidin, jpm init komutunu verin ve enter'a basın:

- -
-

mkdir komutu yeni bir dizin oluşturur. cd komutu ise belirtilen dizine gider.

-
- -
mkdir eklentim
-cd eklentim
-jpm init
-
- -

 

- -

Sizden eklentiniz hakkındaki bilgileri sağlamanız istenecektir: bu bilgiler eklentinizin package.json  dosyasını oluşturmak için kullanılır. Enter'a basın ve varsayılan değerleri kabul edin (Daha sonra package.json dosyasından bu verileri değiştirebilirsiniz). jpm init hakkında daha fazla bilgi için jpm komut referansı adresine bakınız

- -

İstenilen değerleri girdikten veya varsayılan değerleri atadıktan hemen sonra, "package.json" dosyasındaki tüm içerik görüntülenir ve size eklentiniz hakkındaki bu bilgileri kabul edip etmediğiniz sorulur. Devam edebilmek için istenilen komut ile kabul edin.

- -

Eklentiyi hazır hale getirme

- -

Şimdi eklentinizin kodunu yazabilirsiniz. Unless you've changed the value of "entry point" ("main" in package.json), this goes in "index.js" file in the root of your add-on. This file was created for you in the previous step. Open it and add the following code:

- -
var buttons = require('sdk/ui/button/action');
-var tabs = require("sdk/tabs");
-
-var button = buttons.ActionButton({
-  id: "mozilla-link",
-  label: "Visit Mozilla",
-  icon: {
-    "16": "./icon-16.png",
-    "32": "./icon-32.png",
-    "64": "./icon-64.png"
-  },
-  onClick: handleClick
-});
-
-function handleClick(state) {
-  tabs.open("http://www.mozilla.org/");
-}
-
- -
-

Note that "entry point" defaults to "index.js" in jpm, meaning that your main file is "index.js", and it is found directly in your add-on's root.

- -

In cfx, the entry point defaults to "main.js", and is located in the "lib" directory under the add-on's root.

-
- -

Kaydedin.

- -

Sonra, eklenti dizinine "data" isimli bir klasör oluşturun,

- -
mkdir data
-
- -

ve şu üç ikonu "data" klasörüne kaydedin:

- - - - - - - - - - - - - - - - -
icon-16.png
icon-32.png
icon-64.png
- -

Komut satırıne geri dönün ve şu komutu verin:

- -
jpm run
- -

Bu jpm komutu, yaptığınız bu temel eklentinin hazır bir örneğini Firefox tarayıcınızda açacaktır.

- -

If Firefox can not be located, you may need to provide the path to it (example in Ubuntu):

- - -
jpm run -b /usr/bin/firefox
- -

Firefox açıldığında, tarayıcının sağ üst köşesinde Firefox logosu görülecektir. Logoya tıkladığınızda, tarayıcıda http://www.mozilla.org/ adresine giden yeni bir sekme açılır ve eklenti hazırdır.

- -

It uses two SDK modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs. In this case, we've created a button whose icon is the Firefox icon, and added a click handler that loads the Mozilla home page in a new tab.

- -

Try editing this file. For example, we could change the page that gets loaded:

- -
var buttons = require('sdk/ui/button/action');
-var tabs = require("sdk/tabs");
-
-var button = buttons.ActionButton({
-  id: "mozilla-link",
-  label: "Visit Mozilla",
-  icon: {
-    "16": "./icon-16.png",
-    "32": "./icon-32.png",
-    "64": "./icon-64.png"
-  },
-  onClick: handleClick
-});
-
-function handleClick(state) {
-  tabs.open("https://developer.mozilla.org/");
-}
- -

At the command prompt, execute jpm run again. This time clicking it takes you to https://developer.mozilla.org/.

- -

Packaging the add-on

- -

When you've finished the add-on and are ready to distribute it, you'll need to package it as an XPI file. This is the installable file format for Firefox add-ons. You can distribute XPI files yourself or publish them to https://addons.mozilla.org so other users can download and install them.

- -

To build an XPI, just execute the command jpm xpi from the add-on's directory:

- -
jpm xpi
-
- -

You should see a message like:

- -
JPM info Successfully created xpi at /path/to/my-addon/@my-addon-0.0.1.xpi
-
- -

To test that this worked, try installing the XPI file in your own Firefox installation. You can do this by pressing the Ctrl+O key combination (Cmd+O on Mac) from within Firefox, or selecting the "Open" item from Firefox's "File" menu. This will bring up a file selection dialog: navigate to the "@my-addon.xpi" file, open it and follow the prompts to install the add-on.

- -

Note that Firefox by default requires add-ons, even locally developed ones, to be signed. After installation they'll show up disabled in the list of installed add-ons, noting the missing signature. During development, or if you don't plan to distribute, you can open about:config and set xpinstall.signatures.required to false to run it unsigned. This setting applies to any add-on, so take extra care to not accidently install a malicious one from elsewhere.

- -

To distribute your add-on, submit the XPI file to addons.mozilla.org or run jpm sign if you wish to distribute the add-on on your own server.

- -

Özet

- -

In this tutorial we've built and packaged an add-on using three commands:

- - - -

These are the three main commands you'll use when developing SDK add-ons. There's comprehensive reference documentation covering all the commands you can use and all the options they take.

- -

The add-on code itself uses two SDK modules, action button and tabs. There's reference documentation for all the high-level and low-level APIs in the SDK.

- -

What's next?

- -

To get a feel for some of the things you can do with the SDK APIs, try working through some of the tutorials.

diff --git a/files/tr/mozilla/add-ons/sdk/tutorials/index.html b/files/tr/mozilla/add-ons/sdk/tutorials/index.html deleted file mode 100644 index 56ae76c9d4..0000000000 --- a/files/tr/mozilla/add-ons/sdk/tutorials/index.html +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: Tutorials -slug: Mozilla/Add-ons/SDK/Tutorials -translation_of: Archive/Add-ons/Add-on_SDK/Tutorials ---- -
-

Support for extensions using XUL/XPCOM or the Add-on SDK was removed in Firefox 57, released November 2017. As there is no supported version of Firefox enabling these technologies, this page will be removed by December 2020.

- -

Add-ons using the techniques described in this document are considered a legacy technology in Firefox. Don't use these techniques to develop new add-ons. Use WebExtensions instead. If you maintain an add-on which uses the techniques described here, consider migrating it to use WebExtensions.

- -

Starting from Firefox 53, no new legacy add-ons will be accepted on addons.mozilla.org (AMO) for desktop Firefox and Firefox for Android.

- -

Starting from Firefox 57, only extensions developed using WebExtensions APIs will be supported on Desktop Firefox and Firefox for Android.

- -

Even before Firefox 57, changes coming up in the Firefox platform will break many legacy extensions. These changes include multiprocess Firefox (e10s), sandboxing, and multiple content processes. Legacy extensions that are affected by these changes should migrate to use WebExtensions APIs if they can. See the "Compatibility Milestones" document for more information.

- -

A wiki page containing resources, migration paths, office hours, and more, is available to help developers transition to the new technologies.

-
- -

This page lists practical hands-on articles about how to accomplish specific tasks using the SDK.

- -
-

Başlarken

- -
-
-
-
Yükleme
-
Eklentileri geliştirmek için kullanacağınız jpm aracı nasıl yüklenir.
-
- -
-
Sorun giderme
-
-
-
Ortak sorunları tespit etmek ve daha fazla yardım almak için bazı göstericiler.
-
-
-
-
- -
-
-
Başlarken
-
jpm kullanarak, SDK ile basit bir eklenti yaratmanın gidiş yolu.
-
-
-
- -
-

Kullanıcı Arayüzü Yaratma

- -
-
-
-
Araç çubuğu butonu ekleme
-
Attach a button to the Firefox Add-on toolbar.
-
Firefox'a bir menü nesnesi ekleme
-
Add items to Firefox's main menus.
-
-
- -
-
-
Bir açılır pencere gösterme
-
Display a popup dialog implemented with HTML and JavaScript.
-
Bir içerik menüsü nesnesi ekleme
-
Add items to Firefox's context menu.
-
-
-
- -
-

Interact with the browser

- -
-
-
-
Open a web page
-
Open a web page in a new browser tab or window using the tabs module, and access its content.
-
Listen for page load
-
Use the tabs module to get notified when new web pages are loaded, and access their content.
-
-
- -
-
-
Get the list of open tabs
-
Use the tabs module to iterate through the currently open tabs, and access their content.
-
-
-
- -
-

Modify web pages

- -
-
-
-
Modify web pages based on URL
-
Create filters for web pages based on their URL: whenever a web page whose URL matches the filter is loaded, execute a specified script in it.
-
-
- -
-
-
Modify the active web page
-
Dynamically load a script into the currently active web page.
-
-
-
- -
-

Development techniques

- -
-
-
-
Logging
-
Log messages to the console for diagnostic purposes.
-
Creating reusable modules
-
Structure your add-on in separate modules to make it easier to develop, debug, and maintain. Create reusable packages containing your modules, so other add-on developers can use them too.
-
Unit testing
-
Writing and running unit tests using the SDK's test framework.
-
Chrome authority
-
Get access to the Components object, enabling your add-on to load and use any XPCOM object.
-
Creating event targets
-
Enable the objects you define to emit their own events.
-
-
- -
-
-
Listen for load and unload
-
Get notifications when your add-on is loaded or unloaded by Firefox, and pass arguments into your add-on from the command line.
-
Using third-party modules (jpm)
-
Install and use additional modules which don't ship with the SDK itself.
-
Localization
-
Writing localizable code.
-
Mobile development
-
Develop add-ons for Firefox Mobile on Android.
-
Add-on Debugger
-
Debug your add-on's JavaScript.
-
-
-
- -
-

Putting it together

- -
-
-
-
Annotator add-on
-
A walkthrough of a relatively complex add-on.
-
-
-
-- cgit v1.2.3-54-g00ecf