Added Bosnian translations for tour and cheatsheet #564

Merged
merged 3 commits into from Sep 8, 2016

Conversation

Projects
None yet
4 participants
Contributor

sake92 commented Aug 27, 2016

 Added Bosnian translations for following: tutorials/tour cheatsheet Since Croatian and Serbian are very similar languages to Bosnian, they will also benefit from this, I hope. :)
``` Added Bosnian translations for tour and cheatsheet ```
``` 8ca8faa ```
Member

SethTisue commented Aug 30, 2016

 called for reviewers on Gitter (https://gitter.im/scala/contributors?at=57c5d06eee799d3329f364f0)
Member

sjrd commented Aug 30, 2016

 Ping @vjovanov. Maybe you can help, here?
Contributor

vjovanov commented Sep 5, 2016

 I can review this PR thoroughly in two days. From the first look it looks very well written (grammar, integration of english terms, completeness).

vjovanov reviewed Sep 7, 2016

 | Dobro `val x = 5`
Loše `x=6` | konstanta | | `var x: Double = 5` | eksplicitni tip | | funkcije | | | Dobro `def f(x: Int) = { x*x }`
Loše `def f(x: Int) { x*x }` | definicija funkcije
skrivena greška: bez = ovo je procedura koja vraća Unit; uzrokuje zabunu |

vjovanov Sep 7, 2016

Contributor

bez = ~> bez `=`

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 | `(1 to 5).map( x => x*x )` | anonimna funkcija: da bi koristili argument više od jednom, morate mu dati ime. | | Dobro `(1 to 5).map(2*)`
Loše `(1 to 5).map(*2)` | anonimna funkcija: vezana infiksna metoda. Koristite `2*_` zbog jasnoće. | | `(1 to 5).map { x => val y=x*2; println(y); y }` | anonimna funkcija: blokovski stil vraća vrijednost zadnjeg izraza. | | `(1 to 5) filter {_%2 == 0} map {_*2}` | anonimne funkcije: pipeline stil. (može i sa oblim zagradama). |

vjovanov Sep 7, 2016

Contributor

Dot (`.`) goes into parenthesis. M is uppercase at the beginning of that sentence.

sake92 Sep 7, 2016

Author Contributor

I have changed all sentences from right column of cheatsheet to end with a dot (to be consistent). I didn't want to touch the initial formatting at first...

vjovanov reviewed Sep 7, 2016

 | `val zscore = (mean:R, sd:R) => (x:R) => (x-mean)/sd` | curry-jevanje, očita sintaksa. | | `def zscore(mean:R, sd:R) = (x:R) => (x-mean)/sd` | curry-jevanje, očita sintaksa. | | `def zscore(mean:R, sd:R)(x:R) = (x-mean)/sd` | curry-jevanje, sintaksni šećer(kratica). ali onda: | | `val normer = zscore(7, 0.4) _` | je potrebna prateća donja crta za parcijalnu primjenu, samo kod šećer(skraćene) verzije. |

vjovanov Sep 7, 2016

Contributor

šećer(skraćene) ~> šećer (skraćene)

sake92 Sep 7, 2016

Author Contributor

I have fixed all problems regarding missing space before parens. Thanks!

vjovanov reviewed Sep 7, 2016

 | `import java.util.{Date => _, _}` | import svega iz java.util paketa osim Date. | | `package pkg` _na početku fajla_
`package pkg { ... }` | deklaracija paketa. | | strukture podataka | | | `(1,2,3)` | n-torka(tuple) literal. (`Tuple3`) |

Contributor

torka (tuple)

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 | `package pkg` _na početku fajla_
`package pkg { ... }` | deklaracija paketa. | | strukture podataka | | | `(1,2,3)` | n-torka(tuple) literal. (`Tuple3`) | | `var (x,y,z) = (1,2,3)` | destrukturirajuće vezivanje: otpakivanje n-torke podudaranjem uzorka(pattern matching). |

vjovanov Sep 7, 2016

Contributor

In Serbian it would be `destruktivno`, not sure about Bosnian.

sake92 Sep 7, 2016

Author Contributor

I think that "destruktivno" would refer to "destroying" and not to "destructuring". We are not destroying anything with pattern matching so I left that as before.

vjovanov reviewed Sep 7, 2016

 | `import scala.util.control.Breaks._`
`breakable {`
` for (x <- xs) {`
` if (Math.random < 0.1) break`
` }`
`}`| break. ([slajdovi](http://www.slideshare.net/Odersky/fosdem-2009-1013261/21)) | | `for (x <- xs if x%2 == 0) yield x*10` _isto kao_
`xs.filter(_%2 == 0).map(_*10)` | for comprehension: filter/map | | `for ((x,y) <- xs zip ys) yield x*y` _isto kao_
`(xs zip ys) map { case (x,y) => x*y }` | for comprehension: destrukturirajuće vezivanje | | `for (x <- xs; y <- ys) yield x*y` _isto kao_
`xs flatMap {x => ys map {y => x*y}}` | for comprehension: međuproizvod(vektorski proizvod) |

Contributor

d (vektorski

vjovanov reviewed Sep 7, 2016

 language: ba --- U Scali, klase su parameterizovane vrijednostima(parameteri konstruktora) i tipovima(ako su [generičke](generic-classes.html)).

vjovanov Sep 7, 2016

Contributor

I will not comment on space before parenthesis any more. It should be fixed with search and replace.

vjovanov reviewed Sep 7, 2016

 *Apstraktni tipovi* su tipovi čiji identitet nije precizno definisan. U gornjem primjeru, poznato je samo da svaki objekat klase `Buffer` ima a tip-član `T`, ali definicija klase `Buffer` ne kazuje kojem konkretno tipu odgovara `T`. Kao i definicije vrijednosti, možemo prebrisati(override) definicije tipova u podklasama.

vjovanov Sep 7, 2016

Contributor

override is not `prebrisati`.

sake92 Sep 7, 2016

Author Contributor

I've replaced it with "redefinisati". It seemed more clear to me but if you have some other suggestion I'll change it.

vjovanov Sep 8, 2016

Contributor

In german they say `prepisati` (überschreiben) also in some university books this is the term of choice. I would personally use `premostiti`.

vjovanov reviewed Sep 7, 2016

 } Povratni tip metode `newIntSeqBuf` odnosi se na specijalizaciju trejta `Buffer` u kom je tip `U` sada jednak `Int`u. Imamo sličan alijas tip u anonimnoj instanci klase u tijelu metode `newIntSeqBuf`.

vjovanov Sep 7, 2016

Contributor

`alijas` is not a word. Maybe use `pseudonim`

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 println("content = " + buf.element) } Primijetite da moramo koristiti [anotacije za varijancu](variances.html) ovdje;

vjovanov Sep 7, 2016

Contributor

varijancu ~> varijansu

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 } } Kada bi zakomentarisali `throws` anotaciju u klasi Reader dobili bi sljedeću grešku s porukom pri kompajliranju Java main programa:

Contributor

`Reader`

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 mail = "support@coders.com") public class MyClass extends HisClass ... Primjena anotacije u Scali izgleda kao poziv konstruktora, dok se za instanciranje Javinih anotacija moraju koristiti imenovani argumenti:

vjovanov Sep 7, 2016

Contributor

Scali ~> Skali or Scala-i

sake92 Sep 7, 2016

Author Contributor

I left this one as before, but if you insist I'll change it. The thing is that there are some other words that should be treated same, like "Java" for example. I'd then have to change it also, like "Java-i", right?

vjovanov Sep 8, 2016

Contributor

I think so but not 100% sure. It is fine to stay as before. I like Skali the most as this is how you pronounce it.

vjovanov reviewed Sep 7, 2016

 mail = "support@coders.com") class MyScalaClass ... Ova sintaksa je ponekad naporna, npr. ako anotacija ima samo jedan element(bez defaultne vrijednosti), pa po konvenciji,

vjovanov Sep 7, 2016

Contributor

defaultne ~> podrazumevane, predeterminisane

sake92 Sep 7, 2016

Author Contributor

Fixed, thanks!

vjovanov reviewed Sep 7, 2016

 public String mail() default ""; } I upotrijebiti je kao npr:

vjovanov Sep 7, 2016

Contributor

npr ~> na primer, npr.

sake92 Sep 7, 2016

Author Contributor

Changed to "npr.:", btw, in Bosnian it is "naprimjer".

vjovanov reviewed Sep 7, 2016

 class MyScalaClass ... Element `mail` je specificiran s defaultnom vrijednošću tako da ne moramo eksplicitno navoditi vrijednost za njega. Međutim, ako trebamo, ne možemo miksati dva Javina stila:

vjovanov Sep 7, 2016

Contributor

miksati ~> mijesati ?

sake92 Sep 7, 2016

Author Contributor

Fixed. The word "mixin" was stuck in my head... xD Also, "mixable" is awkward to translate, "umjesiv"?

vjovanov Sep 8, 2016

Contributor

:) This one is hard. I would not use mixable in the first place; can be mixed together is fine. I 6 years with Scala I have never heard that word.

vjovanov reviewed Sep 7, 2016

 language: ba --- Scala omogućuje relativno lahku sintaksu za definisanje anonimnih funkcija. Sljedeći izraz kreira funkciju za sljedbenike cijelih brojeva:

Contributor

lahku ~> laku?

sake92 Sep 7, 2016

Author Contributor

Nope, Bosnian is with "h".

vjovanov reviewed Sep 7, 2016

 (x: Int) => x + 1 Ovo je kratica za definiciju sljedeće anonimne klase:

Contributor

double space

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 } } Program definiše izvršnu aplikaciju Classes u form vrhovnog singlton objekta s `main` metodom.

vjovanov Sep 7, 2016

Contributor

`Classes`

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 Treći i četvrti konstruktor su tu samo da dozvole korisnicima HashMap-e da kreiraju instance s vjerovatno-dobrim default parametrima za kapacitet i faktor opterećenja. Problematičnije je to da su defaultne vrijednosti i u Javadocu *i* u kodu.

Contributor

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 Ovo umanjuje ponavljanje koda, ali je manje ekspresivno. Scala ima direktnu podršku za ovo:

vjovanov Sep 7, 2016

Contributor

What is `ovo` in this case?

sake92 Sep 7, 2016

Author Contributor

I missed this one, fixed it in third commit. Literal translation from English version, also ambiguous.

vjovanov reviewed Sep 7, 2016

 // named arguments val m4 = new HashMap[String,Int](loadFactor = 0.8f) Ovako možemo iskoristiti prednost *bilo koje* defaultne vrijednosti korištenjem [imenovanih parametara]({{ site.baseurl }}/tutorials/tour/named-parameters.html).

vjovanov Sep 7, 2016

Contributor

korištenjem ~> korišćenjem ?

sake92 Sep 7, 2016

Author Contributor

No, Bosnian is with "t", like "sretan" etc.

vjovanov reviewed Sep 7, 2016

 language: ba --- U Scali, uzorci(paterni) mogu biti definisani nezavisno od case klasa.

vjovanov Sep 7, 2016

Contributor

Use english in parenthesis to explain what you refer to.

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 Za implicitno importovane objekte `scala.Predef` deklariše nekoliko predefinisanih tipova (npr. `Pair`) i metoda (npr. `assert`) ali i nekoliko implicitnih konverzija. Naprimjer, kada se pozivaju Javine metode koje očekuju `java.lang.Integer`, možete proslijediti `scala.Int`.

Contributor

Na primjer

sake92 Sep 7, 2016

Author Contributor

"Naprimjer" is in right in Bosnian.

vjovanov reviewed Sep 7, 2016

 } _Napomena:_ nova `prepend` metoda ima manje restriktivan tip. Ona dozvoljava, naprimjer, da se nadoveže objekt nadtipa na postojeću listu.

Contributor

na primjer

vjovanov Sep 7, 2016

Contributor

Search and replace this, I will not comment any more.

vjovanov reviewed Sep 7, 2016

 S jednostrukim nasljeđivanjem i interfejsima ovo je nemoguće, jer obje klase sadrže implementacije članova. Scala nam pomaže s _kompozicijom mixin-klasa_. Ona dozvoljava programerima da ponovo iskoriste razliku definicija klasa, tj., sve nove definicije koje nisu naslijeđene. Ovaj mehanizam omogućuje kombiniranje `StringIterator`-a s `RichIterator`-om, kao u sljedećem testnom programu koji ispisuje kolonu svih karaktera datog stringa.

Contributor

testnom ~> test

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 Drugi `case` se podudara ako je `x` jednak stringu `"two"`. Treći slučaj se sastoji od tipskog uzorka; podudara se sa bilo kojim integerom i povezuje vrijednost selektora `x` s varijablom `y` tipa integer. Scalin pattern matching je najkorisniji za podudaranje algebarskih tipova koji su izraženi kroz [case klase](case-classes.html).

vjovanov Sep 7, 2016

Contributor

Skalin or Scala-in. Search and replace in the rest.

vjovanov reviewed Sep 7, 2016

 language: ba --- Suprotno od Jave, sve vrijednosti u Scali su objekti (uključujući brojeve i funkcije).

vjovanov Sep 7, 2016

Contributor

Suprotno od ~> Nasuprot

sake92 Sep 7, 2016

Author Contributor

Fixed.

vjovanov reviewed Sep 7, 2016

 language: ba --- Scala podržava anotacije varijance tipskih parametara [generičkih klasa](generic-classes.html).

vjovanov Sep 7, 2016

Contributor

varijansu. Search and replace in the text.

Contributor

vjovanov commented Sep 7, 2016

 Done; excellent work overall. I would use this translation for Croatian and Serbian as well as it is quite close. Given that we have it now there is no point in translating again in those languages.

sake92 added some commits Sep 7, 2016

``` Fixed formatting an language-specific issues ```
``` 17364a3 ```
``` Fixed ambiguity with 'ovo' ```
``` e384796 ```
Contributor Author

sake92 commented Sep 7, 2016 • edited

 Thanks for reviewing this, I appreciate it. I have fixed all of the formatting issues, reviewed all documents again, used more consistent terminology. If there are other issues regarding this, please let me know. What would be the next priority for translation? When I find time I'll try to contribute more. :)
Contributor

vjovanov commented Sep 8, 2016

 Excellent work!

SethTisue merged commit `c4b399a` into scala:master Sep 8, 2016 1 check passed

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Member

SethTisue commented Sep 8, 2016

 thanks all! I would use this translation for Croatian and Serbian as well as it is quite close (hmm, I'm not sure what the best way to do that within the existing site infrastructure would be)

Merged