Skip to content

Commit

Permalink
cleaned up tags from translations
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Feb 10, 2014
1 parent 220019b commit 0742a5b
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 75 deletions.
23 changes: 14 additions & 9 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,35 @@
"month_n": "{N, plural, =0{January} =1{February} =2{March} =3{April} =4{May} =5{June} =6{July} =7{August} =8{September} =9{October} =10{November} =11{December} other{???}}",
"time_diff": "{T} {T_UNIT, plural, =0{seconds} =1{minutes} =2{hours} =3{days} =4{weeks} =5{months} =6{years} other{???}} {T_PAST, select, true{ago} other{from now}}",

"search_hint": "<b>Hint:</b> search is for full words in the item title, description, room, and participants. You may use * and ? as wildcards and \"quoted words\" for exact phrases. <span>For example, you could try <b id=\"q_hint_example\"></b></span>",
"search_hint": "<b>Hint:</b> search is for full words in the item title, description, room, and participants. You may use * and ? as wildcards and \"quoted words\" for exact phrases.",
"search_example": "For example, you could try <b>{X}</b>",
"part_filter": "{T, select, first{All participants by first name:} last{All participants by last name:} other{All programme participants}}",
"no_ko_id": "No ID set! Please assign konopas_set.id a unique identifier.",
"old_browser": "Unfortunately, your browser doesn't support some of the Javascript features required by KonOpas. To use, please try a different browser.",
"private_mode": "It looks like you're using an iOS or Safari browser in private mode, which disables localStorage. This will result in a suboptimal KonOpas experience.",
"item_not_found": "Program id <b>{ID}</b> not found!",
"next_ended": "There are no more program items scheduled.",
"next_start": "The next program item starts in {H, plural, =0{} one{one hour and} other{# hours and}} {M, plural, one{one minute} other{# minutes}} after the set time.",
"star_export": "<p>Your current selection is encoded in <a href=\"{THIS}\" target=\"_blank\">this page's URL</a>, which you may open elsewhere to share your selection.<p>For easier sharing, you can also generate a <a href=\"{SHORT}\">shorter link</a> or a <a href=\"{QR}\">QR code</a>.",
"star_import": "<p>Your previously selected items are shown with a highlighted interior, while those imported via <a href=\"{THIS}\">this link</a> have a highlighted border.<p>Your previous selection {PREV, plural, =0{was empty} one{had one item} other{had # items}}, and the imported selection has {NEW, plural, =0{no new items} one{one new item} other{# new items}}{SAME, plural, =0{} one{and one which was already selected} other{and # which were already selected}}. {BAD, plural, =0{} one{One of the imported items had an invalid ID.} other{# of the imported items had invalid IDs.}}",
"star_export_this": "Your current selection is encoded in <a href=\"{THIS}\" target=\"_blank\">this page's URL</a>, which you may open elsewhere to share your selection.",
"star_export_share": "For easier sharing, you can also generate a <a href=\"{SHORT}\">shorter link</a> or a <a href=\"{QR}\">QR code</a>.",
"star_import_this": "Your previously selected items are shown with a highlighted interior, while those imported via <a href=\"{THIS}\">this link</a> have a highlighted border.",
"star_import_diff": "Your previous selection {PREV, plural, =0{was empty} one{had one item} other{had # items}}, and the imported selection has {NEW, plural, =0{no new items} one{one new item} other{# new items}}{SAME, plural, =0{} one{and one which was already selected} other{and # which were already selected}}.",
"star_import_bad": "{BAD, plural, =0{} one{One of the imported items had an invalid ID.} other{# of the imported items had invalid IDs.}}",
"star_set": "Set my selection to the imported selection",
"add_n": "add {N}",
"discard_n": "discard {N}",
"star_add": "Add the {N, plural, one{new item} other{# new items}} to my selection</a>",
"star_add": "Add the {N, plural, one{new item} other{# new items}} to my selection",
"star_export_link": "<a href=\"{URL}\">Export selection</a> ({N, plural, one{one item} other{# items}})",
"star_hint": "<p>To \"star\" a program item, click on the gray square next to it. Your selections will be remembered, and shown in this view. You currently don't have any program items selected, so this list is empty.",
"filter_sum_id": "Listing {N, plural, one{one item: <a href=\"{URL}\">{TITLE}</a>} other{# items with id <a href=\"{URL}\">{ID}</a>}}",
"star_hint": "To \"star\" a program item, click on the gray square next to it. Your selections will be remembered, and shown in this view. You currently don't have any program items selected, so this list is empty.",
"filter_sum_id": "Listing {N, plural, one{one item: {TITLE}} other{# items with id {ID}}}",
"filter_sum": "Listing {N, plural, one{one {TAG} item} other{{ALL} # {TAG} items}} {GOT_DAY, select, true{on {DAY}} other{}} {GOT_AREA, select, true{in {AREA}} other{}} {GOT_Q, select, true{matching the query {Q}} other{}}",

"server_cmd_fail": "The command \"<code>{CMD}</code>\" failed.",
"server_cmd_fail": "The command \"{CMD}\" failed.",
"show_comments": "Show {N, plural, one{one comment} other{# comments}}",
"post_author": "{N} posted…",
"ical_login": "For other export options, please login.",
"ical_link": "Your selection is available as an iCal (.ics) calendar at:<br><a href=\"{URL}\">{URL}</a><br><span class=\"hint\">Note that changes you make in this guide may take some time to show in your external calendar software.</span>",
"ical_make": "To view your selection in your calendar app, you may also <br class=\"wide-only\"><a id=\"ical_link\" class=\"js-link\">make it available</a> in iCal (.ics) calendar format",
"ical_link": "Your selection is available as an iCal (.ics) calendar at:",
"ical_hint": "Note that changes you make in this guide may take some time to show in your external calendar software.",
"ical_make": "To view your selection in your calendar app, you may also <br class=\"wide-only\">{A_TAG}make it available</a> in iCal (.ics) calendar format",
"login_why": "Once you've verified your e-mail address, you'll be able to sync your data between different clients (including external calendars), as well as vote & comment on items."
}
23 changes: 14 additions & 9 deletions i18n/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"month_n": "{N, plural, =0{januari} =1{februari} =2{mars} =3{april} =4{maj} =5{juni} =6{juli} =7{augusti} =8{september} =9{oktober} =10{november} =11{december} other{???}}",
"time_diff": "{T} {T_UNIT, plural, =0{sekunder} =1{minuter} =2{timmar} =3{dagar} =4{veckor} =5{månader} =6{år} other{???}} {T_PAST, select, true{sedan} other{från nu}}",

"search_hint": "<b>Tips:</b> sökning sker efter hela ord i programpunkternas titel, beskrivning, sal och deltagare. Det går att använda * och ? som jokertecken och \"citerade ord\" för exakta fraser. <span>Prova till exempel <b id=\"q_hint_example\"></b></span>",
"search_hint": "<b>Tips:</b> sökning sker efter hela ord i programpunkternas titel, beskrivning, sal och deltagare. Det går att använda * och ? som jokertecken och \"citerade ord\" för exakta fraser.",
"search_example": "Prova till exempel <b>{X}</b>",
"part_filter": "{T, select, first{---All participants by first name:} last{---All participants by last name:} other{Visa alla deltagare i programmet}}",
"last_updated": "Program- och deltagaruppgifter uppdaterades för {T}",
"no_ko_id": "ID saknas! Ge konopas_set.id en unik identifierare.",
Expand All @@ -33,15 +34,18 @@
"item_not_found": "---Program id <b>{ID}</b> not found!",
"next_ended": "Det finns inga fler planerade programpunkter.",
"next_start": "Nästa programpunkt börjar om {H, plural, =0{} one{en timme och} other{# timmar och}} {M, plural, one{en minut} other{# minuter}} efter den angivna tiden.",
"star_export": "<p>Dina aktuella stjärnmarkeringar är lagrade i <a href=\"{THIS}\" target=\"_blank\">adressen till denna sida</a>, som du kan öppna på en annan plats och dela med dig av.<p>Dela enklare med en <a href=\"{SHORT}\">kortare länk</a> eller en <a href=\"{QR}\">QR-kod</a>.",
"star_import": "<p>Dina tidigare stjärnmarkerade punkter har ett markerat innanmäte, medan de som importerats via <a href=\"{THIS}\">denna länk</a> har en markerad kant.<p>Din tidigare markering {PREV, plural, =0{var tom} one{innehöll en punkt} other{hade # punkter}}, och den importerade markeringen har {NEW, plural, =0{inga nya punkter} one{en ny punkt} other{# nya punkter}} {SAME, plural, =0{} one{och en som redan var markerad} other{och # som redan var markerade}}. {BAD, plural, =0{} one{En av de importerade punkterna hade ett ogiltiga ID.} other{# av de importerade punkterna hade ogiltiga IDs.}}",
"star_export_this": "Dina aktuella stjärnmarkeringar är lagrade i <a href=\"{THIS}\" target=\"_blank\">adressen till denna sida</a>, som du kan öppna på en annan plats och dela med dig av.",
"star_export_share": "Dela enklare med en <a href=\"{SHORT}\">kortare länk</a> eller en <a href=\"{QR}\">QR-kod</a>.",
"star_import_this": "Dina tidigare stjärnmarkerade punkter har ett markerat innanmäte, medan de som importerats via <a href=\"{THIS}\">denna länk</a> har en markerad kant.",
"star_import_diff": "Din tidigare markering {PREV, plural, =0{var tom} one{innehöll en punkt} other{hade # punkter}}, och den importerade markeringen har {NEW, plural, =0{inga nya punkter} one{en ny punkt} other{# nya punkter}} {SAME, plural, =0{} one{och en som redan var markerad} other{och # som redan var markerade}}.",
"star_import_bad": "{BAD, plural, =0{} one{En av de importerade punkterna hade ett ogiltiga ID.} other{# av de importerade punkterna hade ogiltiga IDs.}}",
"star_set": "Ändra mina markeringar till de importerade markeringarna",
"add_n": "lägg till {N}",
"discard_n": "---discard {N}",
"star_add": "Lägg till {N, plural, one{ny punkt} other{# nya punkter}} till min markering</a>",
"star_add": "Lägg till {N, plural, one{ny punkt} other{# nya punkter}} till min markering",
"star_export_link": "<a href=\"{URL}\">Exportera markering</a> ({N, plural, one{en punkt} other{# punkter}})",
"star_hint": "<p>”Stjärnmarkera” en programpunkt genom att klocka på den grå fyrkanten bredvid den. Dina markeringar lagras och visas i denna vy. Du har inte markerat några programpunkter än, så listan är för närvarande tom.",
"filter_sum_id": "Visar {N, plural, one{en punkt: <a href=\"{URL}\">{TITLE}</a>} other{# punkter med id <a href=\"{URL}\">{ID}</a>}}",
"star_hint": "”Stjärnmarkera” en programpunkt genom att klocka på den grå fyrkanten bredvid den. Dina markeringar lagras och visas i denna vy. Du har inte markerat några programpunkter än, så listan är för närvarande tom.",
"filter_sum_id": "Visar {N, plural, one{en punkt: {TITLE}} other{# punkter med id {ID}}}",
"filter_sum": "Visar {N, plural, one{en {TAG} punkt} other{{ALL} # {TAG} punkter}} {GOT_DAY, select, true{på {DAY}} other{}} {GOT_AREA, select, true{i {AREA}} other{}} {GOT_Q, select, true{stämmer med sökningen {Q}} other{}}",

"Votes": "---Votes",
Expand All @@ -59,11 +63,12 @@
"Login to sync your data": "---Login to sync your data",
"Logout": "---Logout",

"server_cmd_fail": "---The command \"<code>{CMD}</code>\" failed.",
"server_cmd_fail": "---The command \"{CMD}\" failed.",
"show_comments": "---Show {N, plural, one{one comment} other{# comments}}",
"post_author": "---{N} posted…",
"ical_login": "---For other export options, please login.",
"ical_link": "---Your selection is available as an iCal (.ics) calendar at:<br><a href=\"{URL}\">{URL}</a><br><span class=\"hint\">Note that changes you make in this guide may take some time to show in your external calendar software.</span>",
"ical_make": "---To view your selection in your calendar app, you may also <br class=\"wide-only\"><a id=\"ical_link\" class=\"js-link\">make it available</a> in iCal (.ics) calendar format",
"ical_link": "---Your selection is available as an iCal (.ics) calendar at:",
"ical_hint": "---Note that changes you make in this guide may take some time to show in your external calendar software.",
"ical_make": "---To view your selection in your calendar app, you may also {A_TAG}make it available</a> in iCal (.ics) calendar format",
"login_why": "---Once you've verified your e-mail address, you'll be able to sync your data between different clients (including external calendars), as well as vote & comment on items."
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ <h1><a href="#info"><!-- alt="CONVENTION" title="CONVENTION" -->
<input type="submit" id="q_submit" data-txt="Go" data-txt-attr="value">
<input type="reset" id="q_clear" data-txt="Clear all" data-txt-attr="value">
</div>
<div id="q_hint" class="hint" data-txt>search_hint</div>
<div id="q_hint" class="hint"></div>
</form>

<div id="filter_sum"></div>
Expand Down
4 changes: 2 additions & 2 deletions konopas.min.js

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,17 +640,18 @@ function show_star_view(opt) {
var set_link = '#star/set:' + star_list.join(',');
if (set_len) {
if (arrays_equal(set, star_list)) {
view.innerHTML = txt('star_export', {
'THIS':set_link, 'SHORT':link_to_short_url(location.href), 'QR':link_to_qr_code(location.href)
});
view.innerHTML = '<p>' + txt('star_export_this', {'THIS':set_link})
+ '<p>' + txt('star_export_share', {
'SHORT':link_to_short_url(location.href), 'QR':link_to_qr_code(location.href)
});
if (server) server.show_ical_link(view);
} else {
var n_same = array_overlap(set, star_list);
var n_new = set_len - n_same;
var n_bad = set_raw.length - set_len;
var html = txt('star_import', {
'THIS':location.href, 'PREV':stars_len, 'NEW':n_new, 'SAME':n_same, 'BAD':n_bad
});
var html = '<p>' + txt('star_import_this', {'THIS':location.href})
+ '<p>' + txt('star_import_diff', { 'PREV':stars_len, 'NEW':n_new, 'SAME':n_same });
if (n_bad) html += ' ' + txt('star_import_bad', {'BAD':n_bad});
if (!stars_len || (n_same != stars_len)) {
html += '<p>&raquo; <a href="#star" id="star_set_set">' + txt('star_set') + '</a>';
}
Expand Down Expand Up @@ -682,7 +683,7 @@ function show_star_view(opt) {
}
}
} else {
view.innerHTML = txt('star_hint');
view.innerHTML = '<p>' + txt('star_hint');
EL("prog_ls").innerHTML = '';
}
}
Expand Down Expand Up @@ -855,10 +856,10 @@ function _prog_show_list(f) {
f0['id'] = '';
if (!f0['day']) f0['day'] = 'all_days';

var _a = function(t, f0, fx) { return '<a href="' + _prog_hash(f0, fx) + '">' + t + '</a>'; }
if (id_only) {
fs.innerHTML = txt('filter_sum_id', { 'N':ls.length, 'URL':_prog_hash(f0), 'TITLE':ls[0].title, 'ID':f.id });
fs.innerHTML = txt('filter_sum_id', { 'N':ls.length, 'TITLE':_a(ls[0].title, f0, {}), 'ID':_a(f.id, f0, {}) });
} else {
var _a = function(t, f0, fx) { return '<a href="' + _prog_hash(f0, fx) + '">' + t + '</a>'; }
var d = { 'N':ls.length,
'ALL': f.tag || f.day || f.area || f.query ? '' : _a(txt('all'), {}, 0),
'TAG': f.tag ? _a(f.tag, f0, {'tag':''}) : '' };
Expand Down Expand Up @@ -907,20 +908,19 @@ function _prog_show_filters(f) {
var qh = EL('q_hint');
if (qh) {
if (f.query) {
var ex = EL('q_hint_example');
if (ex) {
var glob_hint = f.query.match(/[?*"]/) ? '' : f.query + '*';
if (glob_hint) {
ex.textContent = glob_hint;
ex.parentNode.onmouseup = function() { EL('q').value = glob_hint; EL('q').focus(); EL('q').blur(); };
ex.parentNode.style.display = 'inline';
ex.parentNode.style.cursor = 'pointer';
} else {
ex.parentNode.style.display = 'none';
}
if (/[?*"]/.test(f.query)) {
qh.innerHTML = txt('search_hint');
qh.removeAttribute('onmouseup');
qh.style.cursor = 'auto';
} else {
qh.innerHTML = txt('search_hint') + ' ' + txt('search_example', {'X':f.query+'*'});
qh.onmouseup = function() { EL('q').value = f.query + '*'; EL('q').focus(); EL('q').blur(); };
qh.style.cursor = 'pointer';
}
qh.style.display = 'block';
} else {
qh.style.display = 'none';
}
qh.style.display = f.query ? 'block' : 'none';
}
}

Expand Down
Loading

0 comments on commit 0742a5b

Please sign in to comment.