Ticket #18092: 18092.2.patch

File 18092.2.patch, 9.7 KB (added by taylor.smock, 2 years ago)

Add New Bug readme via site_footer.html and site_head.html

  • new file site_footer.html

    From 904287e448554bacd1b5c055200a2d73b6bff86f Mon Sep 17 00:00:00 2001
    From: Taylor Smock <tsmock@meta.com>
    Date: Thu, 28 Dec 2023 17:08:28 +0000
    Subject: [PATCH] Add new ticket guide
    
    Signed-off-by: Taylor Smock <tsmock@meta.com>
    ---
     site_footer.html | 26 ++++++++++++++++++++++++
     site_head.html   | 51 ++++++++++++++++++++++++++++++++++++++++++++++++
     2 files changed, 77 insertions(+)
     create mode 100644 site_footer.html
     create mode 100644 site_head.html
    
    diff --git a/site_footer.html b/site_footer.html
    new file mode 100644
    index 0000000..6f653a1
    - +  
     1{#  This file allows customizing the appearance of the Trac installation.
     2
     3    Add your customizations to the the end of the HTML <body> content here
     4    and rename the file to site_footer.html.
     5
     6    Note that it will take precedence over a global site_footer.html placed
     7    in the directory specified by [inherit] templates_dir.
     8
     9    More information about site appearance customization can be found here:
     10
     11      https://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance
     12#}
     13
     14# if req.path_info == '/newticket' and 'preview' not in req.args:
     15<div class="warning" id="newticketguide">
     16<table style="border:0; border-collapse:separate; border-spacing:0 10px" class="wiki">
     17<tr><td style="background:#FFFC75; border:1px solid #ccc; border-right:0" valign="top">
     18                <p id="josm_warning_01">${ gettext("You are about to create a new JOSM ticket.") }</p>
     19                <p id="josm_warning_02">${ gettext("Please make sure to always use directly in JOSM <a href=\"wiki/Help/Action/ReportBug\">Help/Report bug</a> or the button in <a href=\"wiki/Help/Action/About\">About Dialog</a> (Shift-F1) to come here:") | safe }</p>
     20                <img src="raw-attachment/wiki/Help/Action/ReportBug/reportbug.png" alt="${ gettext("Bug report menu entry") }" height="103" width="213" />
     21                <p id="josm_warning_03">${ gettext("Using this prefills the bug report with useful information for us (<a href=\"wiki/Help/Action/ShowStatusReport\">Status Report</a>). <b>Please do not create defect tickets without status report!</b>") | safe }</p>
     22                <p id="josm_warning_04">${ gettext("In any case, don't be shy :) Please let us contact you if needed (either by <a href=\"register\">creating an account</a> or entering your e-mail address below which is normally not visible, but can be extracted in specific situations), and you will be notified about ticket progress.") | safe }</p>
     23</td></tr>
     24</table>
     25</div>
     26# endif
  • new file site_head.html

    diff --git a/site_head.html b/site_head.html
    new file mode 100644
    index 0000000..7d5ad46
    - +  
     1{#  This file allows customizing the appearance of the Trac installation.
     2
     3    Add your customizations to the the end of the HTML <head> here
     4    and rename the file to site_head.html.
     5
     6    Note that it will take precedence over a global site_head.html placed
     7    in the directory specified by [inherit] templates_dir.
     8
     9    More information about site appearance customization can be found here:
     10
     11      https://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance
     12#}
     13
     14<link rel="stylesheet" type="text/css" href="${href.chrome('site/style.css')}"/>
     15
     16
     17# if req.path_info == '/newticket' and 'preview' not in req.args:
     18<script>
     19if (navigator.language.indexOf('fr') == 0) {
     20  document.getElementById("josm_warning_01").innerHTML = 'Vous êtes sur le point de créer un nouveau ticket JOSM.';
     21  document.getElementById("josm_warning_02").innerHTML = 'S\'il vous plaît, assurez-vous de toujours utiliser directement dans JOSM, <a href="wiki/Help/Action/ReportBug">Aide/Rapporter un bug</a> ou ce lien dans la <a href="wiki/Help/Action/About">fenêtre À propos</a> (Shift-F1):';
     22  document.getElementById("josm_warning_03").innerHTML = 'Ceci pré-remplit le rapport de bug avec des informations utiles pour nous (<a href="wiki/Help/Action/ShowStatusReport">Rapport d\'état</a>). <b>Merci de pas créer de ticket <i>defect</i> sans rapport d\'état !</b>';
     23  document.getElementById("josm_warning_04").innerHTML = 'Merci de rédiger le ticket en anglais. Dans tous les cas, ne soyez pas timides :) Veuillez nous laisser un moyen de vous contacter si nécessaire (soit en <a href="register">créant un compte</a> ou en rentrant une adresse e-mail ci-dessous (elle ne sera pas visible publiquement mais nous permettra de vous joindre, et vous serez notifié de l\'avancement du ticket).';
     24} else if (navigator.language.indexOf('de') == 0) {
     25  document.getElementById("josm_warning_01").innerHTML = 'Sie sind dabei, ein neues JOSM-Ticket zu erstellen.';
     26  document.getElementById("josm_warning_02").innerHTML = 'Bitte nutzen Sie immer direkt in JOSM <a href="wiki/De:Help/Action/ReportBug">Hilfe → Fehler melden</a> oder die Schaltfläche im <a href="wiki/De:Help/Action/About">"Über JOSM..."-Fenster</a>, um hierher zu gelangen:';
     27  document.getElementById("josm_warning_03").innerHTML = 'Auf diese Weise wird die Fehlermeldung mit hilfreichen Informationen für uns vorausgefüllt (<a href="wiki/De:Help/Action/ShowStatusReport">Statusübersicht</a>). <b>Bitte erstellen Sie keine Fehlertickets vom Typ <i>defect</i> ohne Statusübersicht!</b>';
     28  document.getElementById("josm_warning_04").innerHTML = 'Bitte schreiben Sie wenn möglich die Informationen auf Englisch, damit alle Entwickler das Problem verstehen können. In jedem Fall, seien Sie nicht schüchtern :) Bitte geben Sie uns die Möglichkeit Sie wenn notwendig zu kontaktieren (entweder indem Sie sich <a href="register">einen Account</a> anlegen oder unten Ihre E-Mail-Adresse eingeben, welche normalerweise nicht öffentlich ist, in Spezialfällen aber extrahiert werden kann) und Sie werden über den Ticket-Fortschritt informiert).';
     29} else if (navigator.language.indexOf('pt') == 0) {
     30  document.getElementById("josm_warning_01").innerHTML = 'Você está prestes a criar um novo ticket JOSM.';
     31  document.getElementById("josm_warning_02").innerHTML = 'Por favor, certifique-se de sempre utilizar <a href="wiki/Help/Action/ReportBug">Ajuda/Relatar erro</a> ou este link na <a href="wiki/Help/Action/About">janela Sobre</a> (Shift-F1) para chegar aqui:';
     32  document.getElementById("josm_warning_03").innerHTML = 'Isso preenche o relatório de erros com informações úteis para nós (<a href="wiki/Help/Action/ShowStatusReport">Relatório de Status</a>). <b>Por favor, não crie um ticket do tipo <i>defect</i> sem um relatório de status!</b>';
     33  document.getElementById("josm_warning_04").innerHTML = 'Em todo caso, não seja tímido :) Por favor, deixe-nos uma maneira de contatá-lo se necessário (quer seja <a href="register">criando uma conta</a> ou digitando seu endereço de e-mail abaixo (não será publicamente visível mas nos permitirá alcançá-lo, e você será notificado sobre o progresso do ticket).';
     34} else if (navigator.language.indexOf('ru') == 0) {
     35  document.getElementById("josm_warning_01").innerHTML = 'Вы собираетесь создать новую карточку для JOSM.';
     36  document.getElementById("josm_warning_02").innerHTML = 'Убедитесь, что Вы использовали пункт меню <a href="wiki/Help/Action/ReportBug">Справка/Показать отчёт о состоянии</a> или ссылку в окне  <a href="wiki/Help/Action/About">"О программе"</a> (Shift-F1), чтобы попасть на эту страницу:';
     37  document.getElementById("josm_warning_03").innerHTML = 'В этом случае отчёт об ошибке будет включать в себя полезную для нас информацию (<a href="wiki/Help/Action/ShowStatusReport">отчёт о состоянии</a>). <b>Пожалуйста, не создавайте карточек для <i>дефектов</i> без отчёта о состоянии!</b>';
     38  document.getElementById("josm_warning_04").innerHTML = 'И ещё - не стесняйтесь, пожалуйста! :) Оставьте способ с Вами связаться для уточнения деталей. Лучше всего <a href="register">зарегистрироваться</a>, но можно просто ввести e-mail ниже. Адрес не будет выставлен на всеобщее обозрение, но позволит нам найти Вас. На него придут уведомления об обновлениях в этой карточке.';
     39} else if (navigator.language.indexOf('es') == 0) {
     40  document.getElementById("josm_warning_01").innerHTML = 'Usted está a punto de crear un nuevo ticket en JOSM.';
     41  document.getElementById("josm_warning_02").innerHTML = 'Por favor, asegúrese de utilizar siempre <a href="wiki/Es:Help/Action/ReportBug">Ayuda/Reportar error</a> o este enlace en el <a href="wiki/Es:Help/Action/About">diálogo Acerca de</a> (Shift-F1) para venir aquí:';
     42  document.getElementById("josm_warning_03").innerHTML = 'Usando esto se rellena el informe de error con información útil para nosotros (<a href="wiki/Es:Help/Action/ShowStatusReport">Informe de estado</a>). ¡Por favor, no crear tickets de tipo <i>defect</i> sin el informe de estado!';
     43  document.getElementById("josm_warning_04").innerHTML = 'En cualquier caso, no sea tímido :) Por favor, déjenos una forma de contactarnos con usted de ser necesario (ya sea mediante la <a href="register">creación de una cuenta</a> o introduciendo su dirección de correo electrónico (no será visible públicamente pero nos permitirá comunicarnos con usted, y usted será notificado sobre el progreso del ticket)).';
     44}
     45  jQuery(function($) {
     46    var $ntg = $("#newticketguide");
     47    if ($ntg.length)
     48          $("#propertyform").prepend($ntg.detach());
     49  });
     50</script>
     51# endif