Skip to content

Commit

Permalink
Use entered date in poetry project launch template output.
Browse files Browse the repository at this point in the history
Previously the poetry templates would always show "Sunday, DATE" (or a
translated equivalent) as a placeholder that then needed to be manually
updated.

Note that the generated date text in the template output is in English
even if another language is selected. It could be a lot of work to generate
these strings properly in all the languages and currently the poetry
templates are only being used for English. Even if these are used for
non English the results are no worse than before as they already needed
to be manually updated to replace the fixed placeholder.

This fixes LibriVox#124.
  • Loading branch information
kgroeneveld committed Dec 30, 2021
1 parent 2896ac2 commit db67c0b
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions application/controllers/public/Project_launch.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ public function poetry_weekly_work(&$data)
{
$data['url'] = $data['title_filename'] . "_" . $data['author_filename'][0] . '_[i]your initials in lowercase[/i]_128kb.mp3 (e.g. ' .
$data['title_filename'] . '_' . $data['author_filename'][0] . '_klh_128kb.mp3)';

// Note: The following code would ideally generate the date based on the
// currently selected language. However this is not a simple task and
// currently the poetry templates are only being used for English anyway.
$data['date'] = concat_date($data['expected_completion_year'], $data['expected_completion_month'],
$data['expected_completion_day'], 'l, F jS') ?: '[date]';
}

public function poetry_fortnightly_work(&$data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'Voeg ~5 seconden stilte toe aan het einde van je opname.';
$lang['project_launch_template_filename'] = 'Bestandsnaam:';
$lang['project_launch_template_check_back'] = '[b]Kom over een dag of zo terug[/b] voor feedback over je opname.';
$lang['project_launch_template_deadline_poetry'] = '[b]Deadline:[/b] Dien uw opname in vóór [b]06.00 uur GMT zondag, DATE (00.00 uur CST) [/b]';
$lang['project_launch_template_deadline_poetry'] = '[b]Deadline:[/b] Dien uw opname in vóór [b]06.00 uur GMT %s (00.00 uur CST) [/b]';
$lang['project_launch_template_please_dont_download'] = 'Wilt u a.u.b. geen bestanden downloaden van lopende projecten (tenzij u medewerker bent van het project). Onze servers hebben niet voldoende capaciteit om grote hoeveelheden verkeer af te handelen. Wacht tot de voltooiing van het project. Bedankt!';
$lang['project_launch_template_temp_paragraph'] = 'Deze paragraaf is tijdelijk en zal vervangen worden door de MC met de lijst van secties en lezers (Magic Window) zodra het project in het adminsysteem is geplaatst.';
$lang['project_launch_template_author_wiki'] = 'Link naar auteur op wikipedia (wanneer beschikbaar):';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'Leave 5 seconds of silence at the end.';
$lang['project_launch_template_filename'] = 'Filename:';
$lang['project_launch_template_check_back'] = '[b]Check back[/b] in a day or so for any feedback regarding your reading.';
$lang['project_launch_template_deadline_poetry'] = '[b]Deadline:[/b] Please submit your recording by [b]0600 GMT Sunday, DATE (12:00 AM CST)[/b]';
$lang['project_launch_template_deadline_poetry'] = '[b]Deadline:[/b] Please submit your recording by [b]0600 GMT %s (12:00 AM CST)[/b]';
$lang['project_launch_template_please_dont_download'] = 'Please don\'t download or listen to files belonging to projects in process unless you are the BC or PL. Our servers are not set up to handle the greater volume of traffic. Please wait until the project has been completed. Thanks!';
$lang['project_launch_template_temp_paragraph'] = 'This paragraph is temporary and will be replaced by the MC with the list of sections and reader (Magic Window) once this project is in the admin system.';
$lang['project_launch_template_author_wiki'] = 'Link to author on Wikipedia (if available):';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'Veuillez laisser 5 secondes de silence à la fin.';
$lang['project_launch_template_filename'] = 'Nom de fichier :';
$lang['project_launch_template_check_back'] = '[b]Revenez voir[/b], dans un jour ou deux, s\'il y a un retour sur votre enregistrement.';
$lang['project_launch_template_deadline_poetry'] = '[b]Délai :[/b] Merci de soumettre votre enregistrement pour [b]6h00 GMT (12h00 CST) le dimanche DATE[/b].';
$lang['project_launch_template_deadline_poetry'] = '[b]Délai :[/b] Merci de soumettre votre enregistrement pour [b]6h00 GMT (12h00 CST) le %s[/b].';
$lang['project_launch_template_please_dont_download'] = 'Merci de ne pas télécharger les fichiers pour les projets qui sont encore en cours (sauf si vous êtes le coordinateur/BC ou l\'auditeur d\'épreuve/PL). Notre serveur n\'a pas la capacité appropriée pour plus de trafic. Merci d\'attendre que le projet soit terminé !';
$lang['project_launch_template_temp_paragraph'] = 'Ce paragraphe est temporaire. Le MC y substituera la liste des sections et lecteur(s) (boîte/Magic Window) lorsque ce projet sera entré dans le système.';
$lang['project_launch_template_author_wiki'] = 'Lien vers l\'auteur sur Wikipedia (si disponible) :';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'Lasse am Ende jeder Aufnahme 5 Sekunden Stille.';
$lang['project_launch_template_filename'] = 'Dateiname:';
$lang['project_launch_template_check_back'] = '[b]Schau in ein, zwei Tagen noch einmal vorbei[/b] ob es Feedback bzgl. Deiner Aufnahme gibt.';
$lang['project_launch_template_deadline_poetry'] = '[b]Deadline:[/b] Bitte reiche Deine Aufnahme vor [b]0600 GMT Sonntag, DATUM (12:00 AM CST)[/b] ein.';
$lang['project_launch_template_deadline_poetry'] = '[b]Deadline:[/b] Bitte reiche Deine Aufnahme vor [b]0600 GMT %s (12:00 AM CST)[/b] ein.';
$lang['project_launch_template_please_dont_download'] = 'Bitte warte mit dem Herunterladen und Zuhören, bis das Projekt fertig ist (außer Du bist der BC oder PL). Unser Server ist leider nicht für so viele Downloads geeignet. Dankeschön!';
$lang['project_launch_template_temp_paragraph'] = 'Dieser Absatz is provisorisch und wird vom MC mit dem "Magic Window" ersetzt, wenn das Projekt in die Datenbank aufgenommen wurde.';
$lang['project_launch_template_author_wiki'] = 'Link zum Autor in Wikipedia (falls vorhanden):';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'Per favore lascia ~5 secondi alla fine della tua registrazione.';
$lang['project_launch_template_filename'] = 'Nome del file:';
$lang['project_launch_template_check_back'] = '[b]Torna[/b] fra un paio di giorni per vedere se ci sono commenti per la tua registrazione.';
$lang['project_launch_template_deadline_poetry'] = '[b]Termine ultimo:[/b] Per favore invia la tua registrazione entro [b]0600 GMT domenica, DATA (12:00 AM CST)[/b]';
$lang['project_launch_template_deadline_poetry'] = '[b]Termine ultimo:[/b] Per favore invia la tua registrazione entro [b]0600 GMT %s (12:00 AM CST)[/b]';
$lang['project_launch_template_please_dont_download'] = 'Per favore non scaricare o ascoltare file appartenenti a progetti in corso, a meno che tu non sia il BC o il PL. I nostri server non hanno adeguata capacità per gestire grandi volumi di traffico. Sei pertanto pregato di attendere che il progetto sia completato. Grazie!';
$lang['project_launch_template_temp_paragraph'] = 'Questo paragrafo è provvisorio e sarà sostituito dall\'MC con la lista delle sezioni e dei lettori (Magic Window) una volta che il progetto sarà inserito nel sistema di amministrazione.';
$lang['project_launch_template_author_wiki'] = 'Link all\'autore su Wikipedia (se disponibile):';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'Deixe 5 segundos de silêncio ao final de sua gravação.';
$lang['project_launch_template_filename'] = 'Nome do arquivo:';
$lang['project_launch_template_check_back'] = '[b]Volte ao tópico[/b] dentro de um dia ou dois para ler o feedback da sua leitura.';
$lang['project_launch_template_deadline_poetry'] = '[b]Prazo:[/b] Envie sua gravação antes de [b]06:00 GMT de domingo, DATA (12:00 CST)[/b]';
$lang['project_launch_template_deadline_poetry'] = '[b]Prazo:[/b] Envie sua gravação antes de [b]06:00 GMT de %s (12:00 CST)[/b]';
$lang['project_launch_template_please_dont_download'] = 'Por favor, não descarregue arquivos pertencentes a projetos em andamento, exceto se você for o Coordenador do Projeto ou o Revisor de Áudio. Nossos servidores não estão preparados para lidar com grande volume de tráfego de dados. Por favor aguarde até que o projeto esteja completo. Obrigado!';
$lang['project_launch_template_temp_paragraph'] = 'Este parágrafo é temporário e será substituído pela lista de seções e leitores (Janela Mágica) quando o projeto for incluído no sistema.';
$lang['project_launch_template_author_wiki'] = 'Link para página do autor na Wikipedia (se houver):';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'В конце оставьте 5 секунд тишины.';
$lang['project_launch_template_filename'] = 'Имя файла:';
$lang['project_launch_template_check_back'] = '[b]Проверьте[/b] через день или два, нет ли замечаний или комментариев к вашему чтению.';
$lang['project_launch_template_deadline_poetry'] = '[b]Срок:[/b] Пожалуйста представьте запись к [b]6 часам утра по Гринвичу в воскресенье, DATE (12:00 AM CST)[/b]';
$lang['project_launch_template_deadline_poetry'] = '[b]Срок:[/b] Пожалуйста представьте запись к [b]6 часам утра по Гринвичу в %s (12:00 AM CST)[/b]';
$lang['project_launch_template_please_dont_download'] = 'Пожалуйста, не сгружайте и не слушайте файлы незавершенного проекта если вы не BC или PL. Наши серверы не рассчитаны на интенсивный обмен данными. Пожалуйста, подождите завершения проекта. Спасибо!';
$lang['project_launch_template_temp_paragraph'] = 'Этот временный абзац будет замещен списком секций и чтецов (Magic Window) когда администрация примет проект.';
$lang['project_launch_template_author_wiki'] = 'Ссылка на автора в Википедии (если имеется):';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'Deje 5 segundos de silencio al final de la grabación.';
$lang['project_launch_template_filename'] = 'Nombre del archivo:';
$lang['project_launch_template_check_back'] = '[b]Vuelva a consultar[/b] en uno o dos días para saber si su lectura es correcta.';
$lang['project_launch_template_deadline_poetry'] = '[b]Fecha límite:[/b] Por favor, envíe su grabación antes de las [b]0600 GMT del domingo, FECHA (12:00 am CST)[/b]';
$lang['project_launch_template_deadline_poetry'] = '[b]Fecha límite:[/b] Por favor, envíe su grabación antes de las [b]0600 GMT del %s (12:00 am CST)[/b]';
$lang['project_launch_template_please_dont_download'] = 'Se ruega no bajar ni escuchar archivos pertenecientes a un proyecto en proceso (a menos que sea el coordinador del proyecto o el PL). Nuestros servidores no tienen la capacidad para manejar grandes volúmenes de tráfico. Por favor espere a que terminemos el proyecto. ¡Gracias!';
$lang['project_launch_template_temp_paragraph'] = 'Este párrafo es temporal y será reemplazado por el MC con la lista de secciones y lectores (la Ventanita Mágica) cuando ya esté en el sistema administrativo el proyecto.';
$lang['project_launch_template_author_wiki'] = 'Enlace al autor en Wikipedia (si existe):';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = 'Наприкінці залиште 5 секунд тиші.';
$lang['project_launch_template_filename'] = 'Назва файлу:';
$lang['project_launch_template_check_back'] = '[b]Слідкуйте за цією темою[/b], щоб побачити відгуки щодо вашого звукозапису.';
$lang['project_launch_template_deadline_poetry'] = '[b]Кінцевий термін:[/b] Надішліть свій запис до [b]06:00 ранку за Грінвічем (GTM) неділі, DATE (12:00 AM CST)[/b]';
$lang['project_launch_template_deadline_poetry'] = '[b]Кінцевий термін:[/b] Надішліть свій запис до [b]06:00 ранку за Грінвічем (GTM) %s (12:00 AM CST)[/b]';
$lang['project_launch_template_please_dont_download'] = 'Будь ласка, не завантажуйте та не слухайте файли незавершених проєктів, якщо ви не є BC або PL. Наші сервери не налаштовані для обробки великого обсягу трафіку. Будь ласка, зачекайте завершення проєкту. Дякуємо!';
$lang['project_launch_template_temp_paragraph'] = 'Цей абзац є тимчасовим і буде замінений MC списком секцій та читачів (Magic Window), як тільки цей проєкт потрапить до адміністраторської системи.';
$lang['project_launch_template_author_wiki'] = 'Посилання на автора у Вікіпедії (якщо є):';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$lang['project_launch_template_end_silence'] = '在录音结尾留出5秒空白。';
$lang['project_launch_template_filename'] = '文件名:';
$lang['project_launch_template_check_back'] = '大约一天后[b]回本页看看[/b]是否有人提出了修改意见。';
$lang['project_launch_template_deadline_poetry'] = '[b]截止时间:[/b]请在日期周日 GMT(格林威治时间) 06:00(即北美中部标准时间 12:00 AM)前提交你的录音。';
$lang['project_launch_template_deadline_poetry'] = '[b]截止时间:[/b]请 %s GMT(格林威治时间) 06:00(即北美中部标准时间 12:00 AM)前提交你的录音。';
$lang['project_launch_template_please_dont_download'] = '如果你不是这个项目的 BC 或 PL,请不要下载或试听尚未完成的项目的音频。我们的服务器可能会因此过载崩溃。请耐心等待它结束。谢谢!';
$lang['project_launch_template_temp_paragraph'] = '这段话不会一直在这里;将来这个项目一进入管理系统,它的 MC 就会用一个含有小节和对应的读者的列表(Magic Window)替换掉它。';
$lang['project_launch_template_author_wiki'] = '维基百科上的作者链接(如果有的话):';
Expand Down
2 changes: 1 addition & 1 deletion application/views/public/project_launch/result_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
echo "\n";
echo lang('project_launch_template_check_back'), "\n";
echo "\n";
echo lang('project_launch_template_deadline_poetry'), "\n";
echo sprintf(lang('project_launch_template_deadline_poetry'), $date), "\n";
}

echo "\n";
Expand Down

0 comments on commit db67c0b

Please sign in to comment.