Skip to content

Commit 4dbf4fc

Browse files
committed
Add Bulgarian translation for section naming
1 parent f738542 commit 4dbf4fc

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed

translations/bg_BG/readme.md

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -894,18 +894,18 @@
894894
895895
896896
897-
6. <a name="naming">Naming</a>
897+
6. <a name="naming">Наименуване</a>
898898
899899
900900
901-
A. You are not a human code compiler/compressor, so don't try to be one.
901+
A. Вие не сте човешки компилатор/компресор на код, затова не се опитвайте да бъдете такъв.
902902
903-
The following code is an example of egregious naming:
903+
Последващия код е пример за лошо именуване:
904904
905905
```javascript
906906
907907
// 6.A.1.1
908-
// Example of code with poor names
908+
// Пример за код с лоши имена
909909
910910
function q(s) {
911911
return document.querySelectorAll(s);
@@ -914,14 +914,14 @@
914914
for(i=0;i<els.length;i++){a.push(els[i]);}
915915
```
916916
917-
Without a doubt, you've written code like this - hopefully that ends today.
918-
919-
Here's the same piece of logic, but with kinder, more thoughtful naming (and a readable structure):
917+
Без съмнение сте писали код като този - дано това приключи днес.
920918
919+
Сега същото парче логика, но с по-добро, по-смислено именуване (и четима структура):
920+
921921
```javascript
922922
923923
// 6.A.2.1
924-
// Example of code with improved names
924+
// Пример на кода с подобрени имена
925925
926926
function query( selector ) {
927927
return document.querySelectorAll( selector );
@@ -938,42 +938,41 @@
938938
939939
```
940940
941-
A few additional naming pointers:
941+
Още няколко съвета за именуване на променливи::
942942
943943
```javascript
944944
945945
// 6.A.3.1
946-
// Naming strings
946+
// Именуване на низове
947947
948948
`dog` is a string
949949
950950
951951
// 6.A.3.2
952-
// Naming arrays
952+
// Именуване на масиви
953953
954954
`dogs` is an array of `dog` strings
955955
956956
957957
// 6.A.3.3
958-
// Naming functions, objects, instances, etc
958+
// Именуване на фукнции, обекти, инстанции, и т.н.
959959
960960
camelCase; function and var declarations
961961
962962
963963
// 6.A.3.4
964-
// Naming constructors, prototypes, etc.
965-
964+
// Именуване на конструктори, прототипи и т.н.
966965
PascalCase; constructor function
967966
968967
969968
// 6.A.3.5
970-
// Naming regular expressions
969+
// Именуване на регулярни изрази
971970
972971
rDesc = //;
973972
974973
975974
// 6.A.3.6
976-
// From the Google Closure Library Style Guide
975+
// Из Ръководство по стила Google Closure Library
977976
978977
functionNamesLikeThis;
979978
variableNamesLikeThis;
@@ -984,49 +983,51 @@
984983
985984
```
986985
987-
B. Faces of `this`
988-
989-
Beyond the generally well known use cases of `call` and `apply`, always prefer `.bind( this )` or a functional equivalent, for creating `BoundFunction` definitions for later invocation. Only resort to aliasing when no preferable option is available.
986+
B. Лица на `this`
990987
988+
Извън общоизвестните случаи на `call` и `apply`, винаги избирайте `.bind( this )` или фунционалния му еквивалент, за създаване на дефиниция `BoundFunction` за по-късно извикване. Създаването на псевдоним е в краян случай, ако други решения не са подходящи.
989+
991990
```javascript
992991
993992
// 6.B.1
994993
function Device( opts ) {
995994
996995
this.value = null;
997996
998-
// open an async stream,
999-
// this will be called continuously
997+
// Отворете асинхронен поток,
998+
// това ще се извиква продължително
1000999
stream.read( opts.path, function( data ) {
10011000
1002-
// Update this instance's current value
1003-
// with the most recent value from the
1004-
// data stream
1001+
// Обновете текущата стойност на инстанцията
1002+
// с последната стойност от
1003+
// потока на данни
10051004
this.value = data;
10061005
10071006
}.bind(this) );
10081007
10091008
// Throttle the frequency of events emitted from
10101009
// this Device instance
1010+
// Ограничете честотата на събитията изпратени от
1011+
// инстанцията на Device
10111012
setInterval(function() {
10121013
1013-
// Emit a throttled event
1014+
// Изпращане на събитие
10141015
this.emit("event");
10151016
10161017
}.bind(this), opts.freq || 100 );
10171018
}
10181019
1019-
// Just pretend we've inherited EventEmitter ;)
1020+
// Просто се преструвайте, че сме наследили EventEmitter ;)
10201021
10211022
```
10221023
1023-
When unavailable, functional equivalents to `.bind` exist in many modern JavaScript libraries.
1024+
Когато не е достъпен фукнционалния еквивалент на `.bind` съществува в много модерни JavaScript библиотеки.
10241025
10251026
10261027
```javascript
10271028
// 6.B.2
10281029
1029-
// eg. lodash/underscore, _.bind()
1030+
// например lodash/underscore, _.bind()
10301031
function Device( opts ) {
10311032
10321033
this.value = null;
@@ -1044,7 +1045,7 @@
10441045
}, this), opts.freq || 100 );
10451046
}
10461047
1047-
// eg. jQuery.proxy
1048+
// например jQuery.proxy
10481049
function Device( opts ) {
10491050
10501051
this.value = null;
@@ -1062,7 +1063,7 @@
10621063
}, this), opts.freq || 100 );
10631064
}
10641065
1065-
// eg. dojo.hitch
1066+
// например dojo.hitch
10661067
function Device( opts ) {
10671068
10681069
this.value = null;
@@ -1082,7 +1083,7 @@
10821083
10831084
```
10841085
1085-
As a last resort, create an alias to `this` using `self` as an Identifier. This is extremely bug prone and should be avoided whenever possible.
1086+
В краен случай, създайте алиас на `this` използвайки `self` като идентификатор. Това е изключително податливо на грешки и трябва да се избягва, когато е възможно.
10861087
10871088
```javascript
10881089
@@ -1109,9 +1110,9 @@
11091110
```
11101111
11111112
1112-
C. Use `thisArg`
1113+
C. Използване на `thisArg`
11131114
1114-
Several prototype methods of ES 5.1 built-ins come with a special `thisArg` signature, which should be used whenever possible
1115+
Няколко прототипни метода вградени в ES 5.1 идват със специалния `thisArg`, който трябва да се използва когато е възможно
11151116
11161117
```javascript
11171118
@@ -1123,21 +1124,21 @@
11231124
11241125
Object.keys( obj ).forEach(function( key ) {
11251126
1126-
// |this| now refers to `obj`
1127+
// |this| сочи към `obj`
11271128
11281129
console.log( this[ key ] );
11291130
1130-
}, obj ); // <-- the last arg is `thisArg`
1131+
}, obj ); // <-- последния аргумент е `thisArg`
11311132
1132-
// Prints...
1133+
// Ще изпечата...
11331134
11341135
// "foo"
11351136
// "bar"
11361137
// "qux"
11371138
11381139
```
11391140
1140-
`thisArg` can be used with `Array.prototype.every`, `Array.prototype.forEach`, `Array.prototype.some`, `Array.prototype.map`, `Array.prototype.filter`
1141+
`thisArg` може да се използва `Array.prototype.every`, `Array.prototype.forEach`, `Array.prototype.some`, `Array.prototype.map`, `Array.prototype.filter`
11411142
11421143
7. <a name="misc">Misc</a>
11431144

0 commit comments

Comments
 (0)