summaryrefslogtreecommitdiffhomepage
path: root/ro-ro
diff options
context:
space:
mode:
authorven <vendethiel@hotmail.fr>2016-03-13 10:44:28 +0100
committerven <vendethiel@hotmail.fr>2016-03-13 10:44:28 +0100
commitb8700d497b9ff24ba783349312039006816bcedd (patch)
tree08865a79b5396666899c1ea038bbf501cd2994d6 /ro-ro
parent47bbdecf5e95dc7fefa7df6c6b8364910ad75e3d (diff)
parent19f92ab066ada427653e966af9870d3fbcfd84bc (diff)
Merge pull request #1683 from tricinel/master
[coffeescript/en] Add coffeescript translation to Romanian
Diffstat (limited to 'ro-ro')
-rw-r--r--ro-ro/coffeescript-ro.html.markdown102
1 files changed, 102 insertions, 0 deletions
diff --git a/ro-ro/coffeescript-ro.html.markdown b/ro-ro/coffeescript-ro.html.markdown
new file mode 100644
index 00000000..695274d2
--- /dev/null
+++ b/ro-ro/coffeescript-ro.html.markdown
@@ -0,0 +1,102 @@
+---
+language: coffeescript
+contributors:
+ - ["Tenor Biel", "http://github.com/L8D"]
+ - ["Xavier Yao", "http://github.com/xavieryao"]
+translators:
+ - ["Bogdan Lazar", "http://twitter.com/tricinel"]
+filename: coffeescript-ro.coffee
+lang: ro-ro
+---
+
+CoffeeScript este un limbaj de programare care este compilat in Javascript. Nu exista un interpretator la runtime-ul aplicatiei. Fiind unul din successorii Javascript, CoffeeScript incearca sa compileze Javascript usor de citit si performant.
+
+Mai cititi si [website-ul CoffeeScript](http://coffeescript.org/), care contine un tutorial complet Coffeescript.
+
+```coffeescript
+# CoffeeScript este un limbaj de hipster.
+# Se foloseste de trendurile multor limbaje moderne de programare.
+# Comentarii sunt ca in Ruby sau Python.
+
+###
+Comentariile in bloc sunt create cu `###`, iar acestea sunt transformate in `/*` si `*/` pentru Javascript
+
+Ar trebuie sa intelegeti Javascript pentru a continua cu acest ghid.
+###
+
+# Atribuirea valorilor:
+numar = 42 #=> var numar = 42;
+opus = true #=> var opus = true;
+
+# Conditii:
+numar = -42 if opus #=> if(opus) { numar = -42; }
+
+# Functii:
+laPatrat = (x) -> x * x #=> var laPatrat = function(x) { return x * x; }
+
+plin = (recipient, lichid = "cafea") ->
+ "Umplem #{recipient} cu #{cafea}..."
+#=>var plin;
+#
+#plin = function(recipient, lichid) {
+# if (lichid == null) {
+# lichid = "cafea";
+# }
+# return "Umplem " + recipient + " cu " + lichid + "...";
+#};
+
+# Liste:
+lista = [1..5] #=> var lista = [1, 2, 3, 4, 5];
+
+# Obiecte:
+matematica =
+ radacina: Math.sqrt
+ laPatrat: laPatrat
+ cub: (x) -> x * square x
+#=> var matematica = {
+# "radacina": Math.sqrt,
+# "laPatrat": laPatrat,
+# "cub": function(x) { return x * square(x); }
+# };
+
+# Splats:
+cursa = (castigator, alergatori...) ->
+ print castigator, alergatori
+#=>cursa = function() {
+# var alergatori, castigator;
+# castigator = arguments[0], alergatori = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+# return print(castigator, alergatori);
+# };
+
+# Verificarea existentei:
+alert "Stiam eu!" if elvis?
+#=> if(typeof elvis !== "undefined" && elvis !== null) { alert("Stiam eu!"); }
+
+# Operatiuni cu matrice:
+cuburi = (math.cube num for num in list)
+#=>cuburi = (function() {
+# var _i, _len, _results;
+# _results = [];
+# for (_i = 0, _len = list.length; _i < _len; _i++) {
+# num = list[_i];
+# _results.push(math.cube(num));
+# }
+# return _results;
+# })();
+
+alimente = ['broccoli', 'spanac', 'ciocolata']
+mananca aliment for aliment in alimente when aliment isnt 'ciocolata'
+#=>alimente = ['broccoli', 'spanac', 'ciocolata'];
+#
+#for (_k = 0, _len2 = alimente.length; _k < _len2; _k++) {
+# aliment = alimente[_k];
+# if (aliment !== 'ciocolata') {
+# eat(aliment);
+# }
+#}
+```
+
+## Resurse aditionale
+
+- [Smooth CoffeeScript](http://autotelicum.github.io/Smooth-CoffeeScript/)
+- [CoffeeScript Ristretto](https://leanpub.com/coffeescript-ristretto/read)