Skip to content

Commit 6f262e1

Browse files
committed
partial multiple translations added
1 parent 30ac070 commit 6f262e1

File tree

20 files changed

+792
-664
lines changed

20 files changed

+792
-664
lines changed

book/templating.rst

Lines changed: 146 additions & 146 deletions
Large diffs are not rendered by default.

book/testing.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,52 @@ To get the Profiler for the last request, do the following::
487487
For specific details on using the profiler inside a test, see the
488488
:doc:`/cookbook/testing/profiling` cookbook entry.
489489

490+
To avoid collecting data in each test you can set the ``collect`` parameter
491+
in the configuration:
492+
493+
.. configuration-block::
494+
495+
.. code-block:: yaml
496+
497+
# app/config/config_test.yml
498+
499+
# ...
500+
framework:
501+
profiler:
502+
enabled: true
503+
collect: false
504+
505+
.. code-block:: xml
506+
507+
<!-- app/config/config.xml -->
508+
<?xml version="1.0" encoding="UTF-8" ?>
509+
<container xmlns="http://symfony.com/schema/dic/services"
510+
xmlns:framework="http://symfony.com/schema/dic/symfony"
511+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
512+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
513+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
514+
515+
<!-- ... -->
516+
517+
<framework:config>
518+
<framework:profiler enabled="true" collect="false" />
519+
</framework:config>
520+
</container>
521+
522+
.. code-block:: php
523+
524+
// app/config/config.php
525+
526+
// ...
527+
$container->loadFromExtension('framework', array(
528+
'profiler' => array(
529+
'enabled' => true,
530+
'collect' => false,
531+
),
532+
));
533+
534+
In this way only tests that call ``enableProfiler()`` will collect data.
535+
490536
Redirecting
491537
~~~~~~~~~~~
492538

bundles/DoctrineFixturesBundle/index.rst

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
DoctrineFixturesBundle
22
======================
33

4-
Fixtures are used to load a controlled set of data into a database. This data
5-
can be used for testing or could be the initial data required for the
6-
application to run smoothly. Symfony2 has no built in way to manage fixtures
7-
but Doctrine2 has a library to help you write fixtures for the Doctrine
8-
:doc:`ORM</book/doctrine>` or :doc:`ODM</bundles/DoctrineMongoDBBundle/index>`.
4+
Fiksni podatki (t.i. fixtures) so uporabljeni za nalaganje krmiljenega skupka podatkov v podatkovno bazo. Ti podatki
5+
so lahko uporabljeni za testiranje ali so lahko začetni podatki zahtevani, da
6+
aplikacija tekoče deluje. Symfony2 nima vgrajenega načina za upravljanje fiksnih podatkov,
7+
vendar Doctrine2 ima knjižnico, ki vam pomaga pisati fiksne podatke za Doctrine
8+
:doc:`ORM</book/doctrine>` ali :doc:`ODM</bundles/DoctrineMongoDBBundle/index>`.
99

10-
Setup and Configuration
11-
-----------------------
10+
Nastavitve in konfiguracija
11+
---------------------------
1212

13-
Doctrine fixtures for Symfony are maintained in the `DoctrineFixturesBundle`_.
14-
The bundle uses external `Doctrine Data Fixtures`_ library.
13+
Doctrine fiksni podatki za Symfony so vzdrževani v `DoctrineFixturesBundle`_.
14+
Ta paket uporablja zunanjo knjižnico `Doctrine Data Fixtures`_.
1515

16-
Follow these steps to install the bundle and the library in the Symfony
17-
Standard edition. Add the following to your ``composer.json`` file:
16+
Sledite tem korakom za namestitev paketa in knjižnice v Symfony
17+
standardno izdajo. Dodajte sledeče v vašo datoteko ``composer.json``:
1818

1919
.. code-block:: json
2020
@@ -24,22 +24,22 @@ Standard edition. Add the following to your ``composer.json`` file:
2424
}
2525
}
2626
27-
Update the vendor libraries:
27+
Posodobite knjižnice vendor:
2828

2929
.. code-block:: bash
3030
3131
$ php composer.phar update doctrine/doctrine-fixtures-bundle
3232
33-
If everything worked, the ``DoctrineFixturesBundle`` can now be found
34-
at ``vendor/doctrine/doctrine-fixtures-bundle``.
33+
Če je vse delovalo v redu, je lahko sedaj ``DoctrineFixturesBundle`` najden
34+
v ``vendor/doctrine/doctrine-fixtures-bundle``.
3535

3636
.. note::
3737

38-
``DoctrineFixturesBundle`` installs
39-
`Doctrine Data Fixtures`_ library. The library can be found
40-
at ``vendor/doctrine/data-fixtures``.
38+
``DoctrineFixturesBundle`` namesti
39+
knjižnico `Doctrine Data Fixtures`_. Knjižnico je moč najti
40+
v ``vendor/doctrine/data-fixtures``.
4141

42-
Finally, register the Bundle ``DoctrineFixturesBundle`` in ``app/AppKernel.php``.
42+
Na koncu registrirajte paket ``DoctrineFixturesBundle`` v ``app/AppKernel.php``.
4343

4444
.. code-block:: php
4545
@@ -54,21 +54,21 @@ Finally, register the Bundle ``DoctrineFixturesBundle`` in ``app/AppKernel.php``
5454
// ...
5555
}
5656
57-
Writing Simple Fixtures
58-
-----------------------
57+
Pisanje enostavnih fiksnih podatkov
58+
-----------------------------------
5959

60-
Doctrine2 fixtures are PHP classes where you can create objects and persist
61-
them to the database. Like all classes in Symfony2, fixtures should live inside
62-
one of your application bundles.
60+
Doctrine2 fiksni podatki so razredi PHP, kjer lahko ustvarite objekte in jih podate
61+
v podatkovno bazo. Kot vsi razredi v Symfony2 bi morali fiksni podatki obstojati znotraj
62+
enega izmed vaših paketov aplikacije.
6363

64-
For a bundle located at ``src/Acme/HelloBundle``, the fixture classes
65-
should live inside ``src/Acme/HelloBundle/DataFixtures/ORM`` or
66-
``src/Acme/HelloBundle/DataFixtures/MongoDB`` respectively for the ORM and ODM,
67-
This tutorial assumes that you are using the ORM - but fixtures can be added
68-
just as easily if you're using the ODM.
64+
Za paket lociran v ``src/Acme/HelloBundle`` bi se morali razredi fiksnih podatkov
65+
nahajati znotraj ``src/Acme/HelloBundle/DataFixtures/ORM`` ali
66+
``src/Acme/HelloBundle/DataFixtures/MongoDB`` za ORM in ODM.
67+
Ta vodič predpostavlja, da uporabljate ORM - vendar fiksni podatki so lahko dodani
68+
enako enostavno, če uporabljate ODM.
6969

70-
Imagine that you have a ``User`` class, and you'd like to load one ``User``
71-
entry:
70+
Predstavljajte si, da imate razred ``User`` in bi želeli naložiti eno entiteto
71+
``User``:
7272

7373
.. code-block:: php
7474
@@ -96,66 +96,66 @@ entry:
9696
}
9797
}
9898
99-
In Doctrine2, fixtures are just objects where you load data by interacting
100-
with your entities as you normally do. This allows you to create the exact
101-
fixtures you need for your application.
99+
V Doctrine2 so fiksni podatki samo objekti, kjer naložite podatke z interakcijo
100+
z vašimi entitetami kot to običajno naredite. To vam omogoča, da ustvarite točne
101+
fiksne podatke, ki jih potrebujete za vašo aplikacijo.
102102

103-
The most serious limitation is that you cannot share objects between fixtures.
104-
Later, you'll see how to overcome this limitation.
103+
Najresnejša omejitev je, da ne morete deliti objektov med fiksnimi podatki.
104+
Kasneje boste videli, kako to omejitev premagati.
105105

106-
Executing Fixtures
107-
------------------
106+
Izvrševanje fiksnih podatkov
107+
----------------------------
108108

109-
Once your fixtures have been written, you can load them via the command
110-
line by using the ``doctrine:fixtures:load`` command:
109+
Ko so enkrat fiksni podatki bili napisani, jih lahko naložite preko ukazne
110+
vrstice z uporabo ukaza ``doctrine:fixtures:load``:
111111

112112
.. code-block:: bash
113113
114114
php app/console doctrine:fixtures:load
115115
116-
If you're using the ODM, use the ``doctrine:mongodb:fixtures:load`` command instead:
116+
Če uporabljate ODM, uporabite namesto tega ukaz ``doctrine:mongodb:fixtures:load``:
117117

118118
.. code-block:: bash
119119
120120
php app/console doctrine:mongodb:fixtures:load
121121
122-
The task will look inside the ``DataFixtures/ORM`` (or ``DataFixtures/MongoDB``
123-
for the ODM) directory of each bundle and execute each class that implements
124-
the ``FixtureInterface``.
122+
Opravilo bo pogledalo znotraj ``DataFixtures/ORM`` (ali ``DataFixtures/MongoDB``
123+
za ODM) direktorij za vsak paket in izvršilo vsak razred, ki implementira
124+
``FixtureInterface``.
125125

126-
Both commands come with a few options:
126+
Oba ukaza prihajata z nekaj opcijami:
127127

128-
* ``--fixtures=/path/to/fixture`` - Use this option to manually specify the
129-
directory where the fixtures classes should be loaded;
128+
* ``--fixtures=/path/to/fixture`` - Uporabite to opcijo, da ročno določite
129+
direktorij, kjer bi morali biti naloženi razredi fiksnih podatkov;
130130

131-
* ``--append`` - Use this flag to append data instead of deleting data before
132-
loading it (deleting first is the default behavior);
131+
* ``--append`` - Uporabite to zastavico, da pripnete podatke namesto brisanja podatkov pred
132+
nalaganjem (brisanje najprej je privzeto obnašanje);
133133

134-
* ``--em=manager_name`` - Manually specify the entity manager to use for
135-
loading the data.
134+
* ``--em=manager_name`` - Ročno določite upravljalnika entitet za uporabo pri
135+
nalaganju podatkov.
136136

137137
.. note::
138138

139-
If using the ``doctrine:mongodb:fixtures:load`` task, replace the ``--em=``
140-
option with ``--dm=`` to manually specify the document manager.
139+
Če uporabljate opravilo ``doctrine:mongodb:fixtures:load``, zamenjajte opcijo ``--em=``
140+
z ``--dm=``, da ročno določite upravljalnika dokumenta.
141141

142-
A full example use might look like this:
142+
Celotni primer uporabe lahko izgleda takole:
143143

144144
.. code-block:: bash
145145
146146
php app/console doctrine:fixtures:load --fixtures=/path/to/fixture1 --fixtures=/path/to/fixture2 --append --em=foo_manager
147147
148-
Sharing Objects between Fixtures
149-
--------------------------------
148+
Deljenje objektov med fiksnimi podatki
149+
--------------------------------------
150150

151-
Writing a basic fixture is simple. But what if you have multiple fixture classes
152-
and want to be able to refer to the data loaded in other fixture classes?
153-
For example, what if you load a ``User`` object in one fixture, and then
154-
want to refer to reference it in a different fixture in order to assign that
155-
user to a particular group?
151+
Pisanje osnovnih fiksnih podatkov je enostavno. Vendar kaj, če imate več razredov fiksnih podatkov
152+
in želite biti zmožni se sklicevati na podatke naložene v drugih razredih fiksnih podatkov?
153+
Na primer, kaj če želite naložiti objekt ``User`` v enem fiksnem podatki in nato
154+
se želite sklicevati na njegov sklic v drugem fiksnem podatku, da določite tega uporabnika
155+
določeni skupini?
156156

157-
The Doctrine fixtures library handles this easily by allowing you to specify
158-
the order in which fixtures are loaded.
157+
Knjižnica Doctrine fixtures upravlja s tem enostavno z omogočanjem vam, da določite
158+
vrstni red v katerem so fiksni podatki naloženi.
159159

160160
.. code-block:: php
161161
@@ -193,10 +193,10 @@ the order in which fixtures are loaded.
193193
}
194194
}
195195
196-
The fixture class now implements ``OrderedFixtureInterface``, which tells
197-
Doctrine that you want to control the order of your fixtures. Create another
198-
fixture class and make it load after ``LoadUserData`` by returning an order
199-
of 2:
196+
Razred fiksnih podatkov sedaj implementira ``OrderedFixtureInterface``, ki pove
197+
Doctrine, da želite kontrolirati vrstni red vaših fiksnih podatkov. Ustvarite drug
198+
razred fiksnih podatkov in ga naložite za ``LoadUserData`` z vračilom vrstnega reda
199+
2:
200200

201201
.. code-block:: php
202202
@@ -234,11 +234,11 @@ of 2:
234234
}
235235
}
236236
237-
Both of the fixture classes extend ``AbstractFixture``, which allows you
238-
to create objects and then set them as references so that they can be used
239-
later in other fixtures. For example, the ``$userAdmin`` and ``$groupAdmin``
240-
objects can be referenced later via the ``admin-user`` and ``admin-group``
241-
references:
237+
Oba razreda fiksnih podatkov razširjata ``AbstractFixture``, ki vam omogočata
238+
ustvariti objekte in jih nato nastaviti kot sklice, da sta lahko uporabljena
239+
kasneje v drugih fiksnih podatkih. Na primer objekta ``$userAdmin`` in ``$groupAdmin``
240+
sta lahko sklicana kasneje preko sklicev ``admin-user`` in
241+
``admin-group``:
242242

243243
.. code-block:: php
244244
@@ -275,26 +275,26 @@ references:
275275
}
276276
}
277277
278-
The fixtures will now be executed in the ascending order of the value returned
279-
by ``getOrder()``. Any object that is set with the ``setReference()`` method
280-
can be accessed via ``getReference()`` in fixture classes that have a higher
281-
order.
278+
Fiksni podatki bodo sedaj izvršeni v naraščajočem vrstnem redu vrnjene vrednosti
279+
z ``getOrder()``. Katerikoli objekt, ki je nastavljen z metodo ``setReference()``
280+
je lahko dostopan preko ``getReference()`` v razredu fiksnih podatkov, ki imajo višji
281+
vrstni red.
282282

283-
Fixtures allow you to create any type of data you need via the normal PHP
284-
interface for creating and persisting objects. By controlling the order of
285-
fixtures and setting references, almost anything can be handled by fixtures.
283+
Fiksni podatki vam omogočajo ustvariti kakršnikoli tip podatkov potrebujete preko običajnega PHP
284+
vmesnika za izdelavo in pridobivanje objektov. S krmiljenjem vrstnega reda
285+
fiksnih podatkov in nastavitvijo sklicev je lahko skoraj vse upravljano s strani fiksnih podatkov.
286286

287-
Using the Container in the Fixtures
288-
-----------------------------------
287+
Uporaba kontejnerja v fiksnih podatkih
288+
--------------------------------------
289289

290-
In some cases you may need to access some services to load the fixtures.
291-
Symfony2 makes it really easy: the container will be injected in all fixture
292-
classes implementing :class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface`.
290+
V nekaterih primerih boste morda potrebovali dostopati do storitev in naložiti fiksne podatke.
291+
Symfony2 naredi to res enostavno: kontejner bo injiciran v vse
292+
razrede fiksnih podatkov, ki implementirajo :class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface`.
293293

294-
Let's rewrite the first fixture to encode the password before it's stored
295-
in the database (a very good practice). This will use the encoder factory
296-
to encode the password, ensuring it is encoded in the way used by the security
297-
component when checking it:
294+
Prepišimo prvi fiksni podatek za enkodiranje gesla preden je shranjen
295+
v podatkovno bazo (zelo dobra praksa). To bo uporabilo tovarno enkoder
296+
za enkodiranje gesla in zagotavljalo, da je enkodirano na način uporabljen s strani varnostne
297+
komponente, ko se ga preverja:
298298

299299
.. code-block:: php
300300
@@ -343,17 +343,17 @@ component when checking it:
343343
}
344344
}
345345
346-
As you can see, all you need to do is add :class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface`
347-
to the class and then create a new :method:`Symfony\\Component\\DependencyInjection\\ContainerInterface::setContainer`
348-
method that implements that interface. Before the fixture is executed, Symfony
349-
will call the :method:`Symfony\\Component\\DependencyInjection\\ContainerInterface::setContainer`
350-
method automatically. As long as you store the container as a property on the
351-
class (as shown above), you can access it in the ``load()`` method.
346+
Kot vidite, je vse kar je potrebno dodati, :class:`Symfony\\Component\\DependencyInjection\\ContainerAwareInterface`
347+
razredu in nato ustvariti novo metodo :method:`Symfony\\Component\\DependencyInjection\\ContainerInterface::setContainer`,
348+
ki implementira ta vmesnik. Preden je fiksni podatek izvršen, bo Symfony
349+
poklical metodo :method:`Symfony\\Component\\DependencyInjection\\ContainerInterface::setContainer`
350+
avtomatično. Dokler shranjujete kontejner kot lastnost na
351+
razredu (kot prikazano zgoraj), lahko do njega dostopate v metodi ``load()``.
352352

353353
.. note::
354354

355-
If you are too lazy to implement the needed method :method:`Symfony\\Component\\DependencyInjection\\ContainerInterface::setContainer`,
356-
you can then extend your class with :class:`Symfony\\Component\\DependencyInjection\\ContainerAware`.
355+
Če ste preveč leni za implementacijo potrebne metode :method:`Symfony\\Component\\DependencyInjection\\ContainerInterface::setContainer`,
356+
lahko vaš razred razširite z :class:`Symfony\\Component\\DependencyInjection\\ContainerAware`.
357357

358358
.. _DoctrineFixturesBundle: https://github.com/doctrine/DoctrineFixturesBundle
359359
.. _`Doctrine Data Fixtures`: https://github.com/doctrine/data-fixtures

0 commit comments

Comments
 (0)