diff --git a/README.md b/README.md index 7b7d55b..ce29738 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,12 @@ npm install translit-rue ## Documentation Transliterate text from Cyrillic script to Latin alphabet: ```javascript -translitAzbLat(string) +translitCyrLat(string) ``` Transliterate text from Latin alphabet to Cyrillic script: ```javascript -translitLatAzb(string) +translitLatCyr(string) ``` @@ -38,4 +38,4 @@ Licensed under MIT license. (See [LICENCE.TXT](//github.com/surfinzap/translit/b ## Special thanks -* [@vit-svoboda](https://github.com/vit-svoboda) for help with gulp pipeline (2.0.0) +* [@vit-svoboda](https://github.com/vit-svoboda) for a help with gulp pipeline (2.0.0) diff --git a/dist/translit.min.js b/dist/translit.min.js index a4bcb54..8144932 100644 --- a/dist/translit.min.js +++ b/dist/translit.min.js @@ -1 +1 @@ -!function(){function r(o,i,t){function e(n,u){if(!i[n]){if(!o[n]){var s="function"==typeof require&&require;if(!u&&s)return s(n,!0);if(a)return a(n,!0);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}var j=i[n]={exports:{}};o[n][0].call(j.exports,function(r){return e(o[n][1][r]||r)},j,j.exports,r,o,i,t)}return i[n].exports}for(var a="function"==typeof require&&require,n=0;n $("#action_lat_azb").click(function() { - $('#translit-textarea').val(translitLatAzb($('#translit-textarea').val())); + $('#translit-textarea').val(translitLatCyr($('#translit-textarea').val())); }); $("#action_azb_lat").click(function() { - $('#translit-textarea').val(translitAzbLat($('#translit-textarea').val())); + $('#translit-textarea').val(translitCyrLat($('#translit-textarea').val())); }); diff --git a/test/test_translit.js b/test/test_translit.js index 82ff00c..f3db353 100644 --- a/test/test_translit.js +++ b/test/test_translit.js @@ -84,18 +84,18 @@ // Test translations from latin to azbuka for (var key in test_dict){ - assert(translitLatAzb(key), (test_dict[key]),"Assertion error: " + key + "\ntransliterates to: " + translitLatAzb(key) + "\nshould trans’ to: " + test_dict[key]); + assert(translitLatCyr(key), (test_dict[key]),"Assertion error: " + key + "\ntransliterates to: " + translitLatCyr(key) + "\nshould trans’ to: " + test_dict[key]); } // Test translations from azbuka to latin for (var key in test_dict){ - assert(translitAzbLat(test_dict[key]), (key),"Assertion error: " + test_dict[key] + "\ntransliterates to: " + translitAzbLat(test_dict[key]) + "\nshould trans’ to: " + key); + assert(translitCyrLat(test_dict[key]), (key),"Assertion error: " + test_dict[key] + "\ntransliterates to: " + translitCyrLat(test_dict[key]) + "\nshould trans’ to: " + key); } // Test if script takes different apostrophes assert(streamlineApostrophes("ja‘nk‘o"),"ja’nk’o","Assertion error: apostrophe is not streamlined"); for (var key in test_dict_apostrophe){ - assert(translitLatAzb(key), (test_dict_apostrophe[key]),"Assertion error: " + key + "\ntransliterates to: " + translitLatAzb(key) + ",\nshould trans’ to: " + test_dict[key] + "+\n— this is an apostrophe error."); + assert(translitLatCyr(key), (test_dict_apostrophe[key]),"Assertion error: " + key + "\ntransliterates to: " + translitLatCyr(key) + ",\nshould trans’ to: " + test_dict[key] + "+\n— this is an apostrophe error."); } })();