Commit d46b13c2 authored by Michal Čihař's avatar Michal Čihař

Merge branch 'master' of git://github.com/nijel/weblate

parents 095f10d4 a4de6237
......@@ -6,7 +6,7 @@ weblate 0.5
Relased on ? 2012.
* Support for machine translation using Apertium.
* Support for machine translation using Apertium and Microsoft Translator.
* Several new translations.
* Improved merging of upstream changes.
* Better handle concurrent git pull and translation.
......
......@@ -22,6 +22,10 @@ All settings are stored in :file:`settings.py` (as usual for Django).
API key for Apertium Web Service, you can register at http://api.apertium.org/register.jsp
.. envvar:: MT_MICROSOFT_KEY
API key for Microsoft Translator service, you can register at http://www.bing.com/developers/createapp.aspx
.. envvar:: SITE_TITLE
Site title to be used in website and emails as well.
......
......@@ -3,7 +3,6 @@ Planned features list
Possible features for future releases
* Auto translate using some online service
* Checking of messages
* \n at beginning/end
* php-format
......
......@@ -23,6 +23,9 @@
{% if target_language %}
{% if apertium_api_key %}
<script type="text/javascript" src="http://api.apertium.org/JSLibrary.js?key={{ apertium_api_key }}"></script>
{% endif %}
{% if microsoft_api_key %}
<script type="text/javascript" src="http://api.microsofttranslator.com/v1/Ajax.svc/Embed?appId={{ microsoft_api_key }}"></script>
{% endif %}
<script type="text/javascript">
var target_language = '{{ target_language }}';
......
......@@ -56,7 +56,7 @@
{% endif %}
<tr>
<td></td>
<td><a href="#" id="copy-text">{% trans "Copy" %}</td>
<td class="toolbar"><a href="#" id="copy-text">{% trans "Copy" %}</td>
</tr>
<tr>
<th>{% if unit.is_plural %}{% trans "Translations" %}{% else %}{% trans "Translation" %}{% endif %}</th>
......
......@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-09 10:57+0100\n"
"PO-Revision-Date: 2012-03-09 05:06+0200\n"
"Last-Translator: Bartosz Feński <fenio@debian.org>\n"
"PO-Revision-Date: 2012-03-09 12:44+0200\n"
"Last-Translator: Marcin Kozioł <lord_dark@wp.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
......@@ -57,7 +57,7 @@ msgstr "Imię"
#: accounts/forms.py:36
msgid "Your email"
msgstr "Email"
msgstr "E-mail"
#: accounts/forms.py:38
msgid "Message"
......@@ -81,11 +81,11 @@ msgstr "Przynajmniej 5 znaków."
#: accounts/forms.py:53
msgid "Email address"
msgstr "Adres email"
msgstr "Adres e-mail"
#: accounts/forms.py:54
msgid "Activation email will be sent here."
msgstr "Tutaj zostanie posłany email aktywacyjny."
msgstr "E-mail aktywacyjny zostanie wysłany tutaj."
#: accounts/forms.py:55 html/profile.html:33
msgid "Password"
......@@ -109,7 +109,7 @@ msgstr "Hasło musi mieć przynajmniej 6 znaków."
#: accounts/forms.py:74
msgid "Username needs to have at least five characters."
msgstr "Nazwa użytkownika musi mieć conajmniej 5 znaków."
msgstr "Nazwa użytkownika musi mieć co najmniej 5 znaków."
#: accounts/i18n.py:6
msgid "This username is already taken. Please choose another."
......@@ -123,7 +123,7 @@ msgstr "Musisz wprowadzić to samo hasło za każdym razem"
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Adres email jest już używany. Proszę podać inny adres email."
msgstr "Ten adres e-mail jest już używany. Proszę podać inny e-mail."
#: accounts/models.py:16
msgid "Interface Language"
......@@ -135,11 +135,11 @@ msgstr "Języki"
#: accounts/models.py:27
msgid "Secondary languages"
msgstr "Języki drugorzędne"
msgstr "Drugorzędne języki"
#: accounts/models.py:49
msgid "Your profile has been migrated, you might want to adjust preferences."
msgstr "Twój profil został zmigrowany, zapewne chcesz dostosować preferencje."
msgstr "Twój profil został przeniesiony, warto dopasować preferencje."
#: accounts/views.py:34
msgid "User profile"
......@@ -147,7 +147,7 @@ msgstr "Profil użytkownika"
#: accounts/views.py:50
msgid "Message has been sent to administrator."
msgstr "Wiadomość została posłana do administratora."
msgstr "Wiadomość została wysłana do administratora."
#: accounts/views.py:63
msgid "Contact"
......@@ -155,12 +155,13 @@ msgstr "Kontakt"
#: html/404.html:7
msgid "The page you are looking for was not found."
msgstr "Poszukiwana strona nie została znaleziona."
msgstr "Strona, której szukasz nie została odnaleziona."
#: html/404.html:11
msgid ""
"However there are following translation projects available on this server:"
msgstr "Ale następujące projekty tłumaczeń są dostępne na tym serwerze:"
msgstr ""
"Jednakże istnieją następujące projekty tłumaczeniowe dostępne na serwerze:"
#: html/500.html:5
msgid "Server Error"
......@@ -171,8 +172,8 @@ msgid ""
"The server had serious problems while serving your request. We've just sent "
"our trained monkeys to fix the issue."
msgstr ""
"Serwer miał poważne problemy próbując obsłużyć żądanie. Wysłaliśmy stado "
"małp, by naprawić problem."
"Serwer miał poważne problemy próbując obsłużyć żądanie. Właśnie wysłaliśmy "
"nasze przeszkolone małpy, aby rozwiązały problem."
#: html/base.html:43
#, python-format
......@@ -185,7 +186,7 @@ msgstr "Wyloguj"
#: html/base.html:46 html/registration/registration_form.html:25
msgid "Register"
msgstr "Zarejestruj"
msgstr "Rejestruj"
#: html/base.html:52
msgid "Home"
......@@ -261,7 +262,7 @@ msgstr "Najlepsi sugerujący"
#: html/index.html:79
msgid "Suggested"
msgstr "Sugerowane"
msgstr "Zasugerowane"
#: html/index.html:95
#, python-format
......@@ -294,7 +295,7 @@ msgstr "Konto"
#: html/profile.html:31
msgid "Your name and email will appear as author on Git commits."
msgstr "Twoje imię, nazwisko i email pojawią się jako autor w logach Gita."
msgstr "Twoje nazwa i e-mail pojawi się jako autor w logach Gita."
#: html/profile.html:36
#, python-format
......@@ -315,7 +316,7 @@ msgstr "Podprojekt"
#: html/project_info.html:2
msgid "Project Information"
msgstr "Informacje o projekcie"
msgstr "Informacje projektu"
#: html/project_info.html:4
msgid "Project website:"
......@@ -362,7 +363,7 @@ msgstr "Tłumacz"
#: html/translate.html:17
#, python-format
msgid "Showing string %(position)s out of %(total)s."
msgstr "Pokazuje napis %(position)s z %(total)s."
msgstr "Pokazuje ciąg %(position)s z %(total)s."
#: html/translate.html:19
msgid "First"
......@@ -378,12 +379,12 @@ msgstr "Następny"
#: html/translate.html:22
msgid "Last"
msgstr "Ostatnio"
msgstr "Ostatni"
#: html/translate.html:27
#, python-format
msgid "Searching for \"%(search_query)s\"."
msgstr "Szukanie \"%(search_query)s\"."
msgstr "Szukaj dla \"%(search_query)s\"."
#: html/translate.html:48
msgid "Source"
......@@ -395,7 +396,7 @@ msgstr "Kontekst"
#: html/translate.html:59
msgid "Copy"
msgstr "Skopiuj"
msgstr "Kopiuj"
#: html/translate.html:72
msgid "Suggestions"
......@@ -404,11 +405,11 @@ msgstr "Sugestie"
#: html/translate.html:79
#, python-format
msgid "Suggested by %(user)s"
msgstr "Sugerowane przez %(user)s"
msgstr "Zasugerowane przez %(user)s"
#: html/translate.html:81
msgid "Suggested by anonymous user"
msgstr "Sugerowane przez anonima"
msgstr "Zasugerowane przez gościa"
#: html/translate.html:98
msgid "Used in"
......@@ -494,7 +495,7 @@ msgid ""
msgstr "Możesz teraz <a href=\"%(profile_url)s\">dostosować swój profil</a>."
#: html/registration/activate.html:20
#, fuzzy, python-format
#, python-format, fuzzy
msgid ""
"\n"
" Your account could not be activated.\n"
......@@ -511,13 +512,13 @@ msgid_plural ""
" If this is not the case, please contact the website administrator. \n"
" Otherwise, you may <a href=\"%(reg_url)s\">register again.</a>\n"
" "
msgstr[0] ""
"\n"
msgstr[0] "\n"
"Twoje konto nie może zostać aktywowane.\n"
"Może to być spowodowane, ponieważ jest już aktywne lub dlatego, \n"
"że czekałeś %(days) dni, aby go uaktywnić.\n"
"Jeśli to nie jest przypadek, skontaktuj się z administratorem strony.\n"
"W przeciwnym razie może <a href=\"%(reg_url)s\">zarejestruj ponownie.</a>"
"W przeciwnym razie możesz <a href=\"%(reg_url)s\">zarejestrować się "
"ponownie.</a>"
msgstr[1] ""
msgstr[2] ""
......
......@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-09 10:57+0100\n"
"PO-Revision-Date: 2012-03-09 10:07+0200\n"
"PO-Revision-Date: 2012-03-09 11:36+0200\n"
"Last-Translator: Burak Yavuz <hitowerdigit@hotmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: tr\n"
......@@ -284,7 +284,7 @@ msgstr "Dil"
#: html/profile.html:11
msgid "Please fix errors in the form."
msgstr "Lütfen hataları form içinde düzeltin."
msgstr "Lütfen formdaki hataları düzeltin."
#: html/profile.html:20
msgid "Preferences"
......@@ -487,8 +487,8 @@ msgid ""
" <b>%(username)s</b>."
msgstr ""
"Teşekkür ederiz.\n"
"Hesabınız şimdi etkinleştirildi.\n"
"Kullanıcı adınız <b>%(username)s</b>."
" Hesabınız şimdi etkinleştirildi.\n"
" Kullanıcı adınız <b>%(username)s</b>."
#: html/registration/activate.html:15
#, python-format
......@@ -636,10 +636,12 @@ msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll e-mail "
"instructions for setting a new one."
msgstr ""
"Parolanızı mı unuttunuz? Aşağıya e-posta adresinizi girin ve yeni bir "
"tanesini ayarlamak için talimatları postalayalım."
#: html/registration/password_reset_form.html:10
msgid "Reset my password"
msgstr ""
msgstr "Parolamı sıfırla"
#: html/registration/registration_complete.html:7
msgid ""
......@@ -647,73 +649,79 @@ msgid ""
"a confirmation link. Please follow this link in order to complete your "
"registration."
msgstr ""
"Kayıt olduğunuz için teşekkür ederiz. Çok yakında bir onaylama bağlantısı \n"
"alacaksınız. Lütfen kaydınızı tamamlamak için bu bağlantıyı takip edin."
#: html/registration/registration_form.html:11
msgid "Please fix errors in registration form."
msgstr ""
msgstr "Lütfen kayıt formundaki hataları düzeltin."
#: html/registration/registration_form.html:23
msgid "By registering you agree to use your name and email in Git commits."
msgstr ""
"Kayıt olarak Git sunumlarındaki kullanıcı adı ve epostayı kullanmayı kabul "
"ettiniz."
#: lang/models.py:25
msgid "Singular"
msgstr ""
msgstr "Tekil"
#: lang/models.py:27
msgid "Plural"
msgstr ""
msgstr "Çoğul"
#: lang/models.py:28
#, python-format
msgid "Plural form %d"
msgstr ""
msgstr "Çoğul formu %d"
#: trans/forms.py:27
msgid ""
"This equation is used to identify which plural form will be used based on "
"given count (n)."
msgstr ""
"Bu eşitlik verilen sayıya (n) bağlı kullanılacak çoğul formu tanımlamak için "
"kullanılır."
#: trans/forms.py:28
msgid "Plural equation"
msgstr ""
msgstr "Çoğul eşitlik"
#: trans/forms.py:58
msgid "File"
msgstr ""
msgstr "Dosya"
#: trans/forms.py:59
msgid "Overwrite existing translations"
msgstr ""
msgstr "Mevcut çevirilerin üzerine yaz"
#: trans/forms.py:62
msgid "Query"
msgstr ""
msgstr "Sorgu"
#: trans/forms.py:63
msgid "Search in source strings"
msgstr ""
msgstr "Kaynak satırlarda ara"
#: trans/forms.py:64
msgid "Search in target strings"
msgstr ""
msgstr "Hedef satırlarda ara"
#: trans/forms.py:65
msgid "Search in context strings"
msgstr ""
msgstr "Bağlam satırlarında ara"
#: trans/models.py:62
msgid "Name to display"
msgstr ""
msgstr "Görüntülemek için ad"
#: trans/models.py:63
msgid "Name used in URLs"
msgstr ""
msgstr "URL'lede kullanılan ad"
#: trans/models.py:65
msgid "URL of Git repository"
msgstr ""
msgstr "Git havuzu URL'si"
#: trans/models.py:66
#, python-format
......@@ -721,67 +729,69 @@ msgid ""
"Link to repository browser, use %(file)s and %(line)s as filename and line "
"placeholders"
msgstr ""
"Havuz tarayıcısına bağlantı, %(file)s ve %(line)s, dosya adı ve satır yer "
"tutucuları olarak kullan"
#: trans/models.py:67
msgid "Git branch to translate"
msgstr ""
msgstr "Çevirmek için Git dalı"
#: trans/models.py:68
msgid "Mask of files to translate, use * istead of language code"
msgstr ""
msgstr "Çevirmek için dosyaların maskesi, dil kodu yerine * kullan"
#: trans/models.py:374
msgid "All strings"
msgstr ""
msgstr "Tüm satırlar"
#: trans/models.py:379
#, python-format
msgid "Not translated strings (%d)"
msgstr ""
msgstr "Çevrilmemiş satırlar (%d)"
#: trans/models.py:381
#, python-format
msgid "Fuzzy strings (%d)"
msgstr ""
msgstr "Belirsiz satırlar (%d)"
#: trans/models.py:383
#, python-format
msgid "Strings with suggestions (%d)"
msgstr ""
msgstr "Önerileri olan satırlar (%d)"
#: trans/views.py:171
msgid "You need to login to be able to save translations!"
msgstr ""
msgstr "Çevirileri kaydedebilmek için oturum açmanız gerekir!"
#: trans/views.py:189
msgid "Message you wanted to translate is no longer available!"
msgstr ""
msgstr "Çevirmek istediğiniz mesaj bundan böyle mevcut değil!"
#: trans/views.py:194
msgid "You need to login to be able to manage suggestions!"
msgstr ""
msgstr "Önerileri yönetebilmek için oturum açmanız gerekir!"
#: trans/views.py:216
msgid "Invalid suggestion!"
msgstr ""
msgstr "Geçersiz öneri!"
#: trans/views.py:242
msgid "You have reached end of translating."
msgstr ""
msgstr "Çevirinin sonuna geldiniz."
#: trans/views.py:305
msgid "File content successfully merged into translation."
msgstr ""
msgstr "Dosya içeriği başarılı olarak çeviri içine birleştirildi."
#: trans/views.py:307
msgid "There were no new strings in uploaded file."
msgstr ""
msgstr "Gönderilen dosyada yeni satırlar yoktu."
#: trans/views.py:309
#, python-format
msgid "File content merge failed: %s"
msgstr ""
msgstr "Dosya içeriğinin birleştirilmesi başarısız oldu: %s"
#: trans/views.py:326
msgid "Page Not Found"
msgstr ""
msgstr "Sayfa Bulunamadı"
......@@ -80,10 +80,15 @@ textarea.translation {
td.suggestions table {
width: 100%
}
#copy-text, .button-prev, .button-next, .button-first, .button-end, #translate-apertium {
.button-prev, .button-next, .button-first, .button-end {
width: 20px;
height: 20px;
}
td.toolbar a {
height: 20px;
font-size: 10px;
font-weight: normal;
}
.helptext {
font-size: smaller;
}
......
......@@ -7,6 +7,9 @@ $(function() {
$('.button').button();
$('ul.menu li a').button();
$('ul.breadcums').buttonset();
$('div.progress').each(function f(i, e) {e = $(e); e.progressbar({ value: parseInt(e.attr('id')) })});
$('.accordion').accordion();
$('.errorlist').addClass('ui-state-error ui-corner-all');
$('.sug-accept').button({text: false, icons: { primary: "ui-icon-check" }});
$('.sug-delete').button({text: false, icons: { primary: "ui-icon-close" }});
$('.navi').buttonset();
......@@ -15,7 +18,7 @@ $(function() {
$('.button-prev').button({text: false, icons: { primary: "ui-icon-seek-prev" }});
$('.button-end').button({text: false, icons: { primary: "ui-icon-seek-end" }});
$('textarea.translation').change(text_change).keypress(text_change).autogrow().focus();
$('#copy-text').button({text: false, icons: { primary: "ui-icon-arrowthick-1-s" }}).click(function f() {
$('#copy-text').button({text: true, icons: { primary: "ui-icon-arrow-1-s" }}).click(function f() {
$.get("/js/get/" + $('#id_checksum').attr('value') + '/', function(data) {
$('#id_target').text(data);
});
......@@ -34,7 +37,18 @@ $(function() {
return false;
});
}
$('.accordion').accordion();
$('.errorlist').addClass('ui-state-error ui-corner-all');
$('div.progress').each(function f(i, e) {e = $(e); e.progressbar({ value: parseInt(e.attr('id')) })});
if (typeof(Microsoft) != 'undefined' && typeof(target_language) != 'undefined') {
var langs = Microsoft.Translator.getLanguages();
if (langs.indexOf(target_language) != -1) {
$('#copy-text').after('<a href="#" id="translate-microsoft">' + gettext('Translate using Microsoft Translator') + '</a>');
$('#translate-microsoft').button({text: true, icons: { primary: "ui-icon-shuffle" }}).click(function f() {
$.get("/js/get/" + $('#id_checksum').attr('value') + '/', function(data) {
Microsoft.Translator.translate(data, 'en', target_language, function (ret) {
$('#id_target').text(ret);
});
});
return false;
});
}
}
});
......@@ -218,6 +218,9 @@ LOGGING = {
# Apertium Web Service, register at http://api.apertium.org/register.jsp
MT_APERTIUM_KEY = None
# Microsoft Translator service, register at http://www.bing.com/developers/createapp.aspx
MT_MICROSOFT_KEY = None
# Path where git repositories are stored, it needs to be writable
GIT_ROOT = '%s/repos/' % WEB_ROOT
......
......@@ -23,4 +23,5 @@ def url(request):
def mt(request):
return {
'apertium_api_key': settings.MT_APERTIUM_KEY,
'microsoft_api_key': settings.MT_MICROSOFT_KEY,
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment