Skip to content

Commit

Permalink
Merge pull request #45 from alyf-de/translations
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra authored Jul 20, 2024
2 parents 564e3fc + 7f02d1e commit cc457bb
Show file tree
Hide file tree
Showing 9 changed files with 185 additions and 45 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ This app uses the Default Print Format. To change the Default Print Format,

The PDF will be created in the language that is specified in the "Language" field of the current document. In your **Customer** and **Supplier** masters you can choose the default "Print Language".

## Add translations

To add translations for a new language, please copy `pdf_on_submit/locale/main.pot` to `pdf_on_submit/locale/<language_code>.po` and fill in the translations (`msgstr`) for each `msgid`. When you're done, you can commit your changes and send a PR.

## Licence

Copyright (C) 2020 ALYF GmbH <[email protected]>
Expand Down
File renamed without changes.
19 changes: 2 additions & 17 deletions pdf_on_submit/attach_pdf.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
"""
PDF on Submit. Creates a PDF when a document is submitted.
Copyright (C) 2019 Raffael Meyer <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
# Copyright (c) 2019, Raffael Meyer and contributors
# For license information, please see license.txt

import frappe
from frappe import _
Expand Down
9 changes: 5 additions & 4 deletions pdf_on_submit/hooks.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
# Copyright (c) 2019, Raffael Meyer and contributors
# For license information, please see license.txt

from . import __version__ as app_version

app_name = "pdf_on_submit"
app_title = "PDF on Submit"
app_publisher = "Raffael Meyer"
app_publisher = "ALYF GmbH"
app_description = "Generatation, Sales Order, Sales Invoice and Delivery Note"
app_icon = "octicon octicon-file-pdf"
app_color = "#DB2B39"
app_email = "raffael@alyf.de"
app_email = "hallo@alyf.de"
app_license = "GPLv3"

# Includes in <head>
Expand Down
86 changes: 86 additions & 0 deletions pdf_on_submit/locale/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# German translations for PDF on Submit.
# Copyright (C) 2024 ALYF GmbH
# This file is distributed under the same license as the PDF on Submit project.
# ALYF GmbH <[email protected]>, 2024.
#
msgid ""
msgstr ""
"Project-Id-Version: PDF on Submit VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-07-20 23:34+0053\n"
"PO-Revision-Date: 2024-07-20 23:34+0053\n"
"Last-Translator: [email protected]\n"
"Language-Team: [email protected]\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.13.1\n"

#. Name of a role
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "Accounts Manager"
msgstr ""

#. Label of a Section Break field in DocType 'PDF on Submit Settings'
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "Active"
msgstr "Aktiv"

#. Label of a Data field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Auto Name"
msgstr "Schema für Dateiname"

#. Label of a Check field in DocType 'PDF on Submit Settings'
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "Create PDF In Background"
msgstr "PDF im Hintergrund erstellen"

#: attach_pdf.py:88
msgid "Creating PDF ..."
msgstr "Erstelle PDF ..."

#. Label of a Link field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Document Type"
msgstr "Dokumenttyp"

#. Name of a DocType
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Enabled DocType"
msgstr "Aktivierter Dokumenttyp"

#. Label of a Table field in DocType 'PDF on Submit Settings'
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "Enabled For"
msgstr "Aktiviert für"

#. Label of a Link field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Letter Head"
msgstr "Briefkopf"

#. Description of the 'Auto Name' (Data) field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid ""
"Naming Options:\n"
"<ol><li><b>format:EXAMPLE-{MM}-{fieldname1}-{fieldname2}-{#####}</b> - Replace all braced words (fieldnames, date words (DD, MM, YY), series) with their value. Outside braces, any characters can be used.</li></ol>"
msgstr ""
"Optionen:\n"
"<ol><li><b>format:BEISPIEL-{MM}-{feldname1}-{feldname2}-{#####}</b> - Ersetzt alle in geschweiften Klammern stehenden Wörter (Feldnamen, Datumsangaben (DD, MM, YY), Nummernkreise) durch ihren Wert. Außerhalb der geschweiften Klammern können beliebige Zeichen verwendet werden.</li></ol>"

#. Name of a DocType
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "PDF on Submit Settings"
msgstr "PDF-on-Submit-Einstellungen"

#. Label of a Link field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Print Format"
msgstr ""

#. Name of a role
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "System Manager"
msgstr ""

84 changes: 84 additions & 0 deletions pdf_on_submit/locale/main.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Translations template for PDF on Submit.
# Copyright (C) 2024 ALYF GmbH
# This file is distributed under the same license as the PDF on Submit project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
msgid ""
msgstr ""
"Project-Id-Version: PDF on Submit VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-07-21 00:05+0053\n"
"PO-Revision-Date: 2024-07-21 00:05+0053\n"
"Last-Translator: [email protected]\n"
"Language-Team: [email protected]\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.13.1\n"

#. Name of a role
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "Accounts Manager"
msgstr ""

#. Label of a Section Break field in DocType 'PDF on Submit Settings'
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "Active"
msgstr ""

#. Label of a Data field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Auto Name"
msgstr ""

#. Label of a Check field in DocType 'PDF on Submit Settings'
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "Create PDF In Background"
msgstr ""

#: attach_pdf.py:74
msgid "Creating PDF ..."
msgstr ""

#. Label of a Link field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Document Type"
msgstr ""

#. Name of a DocType
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Enabled DocType"
msgstr ""

#. Label of a Table field in DocType 'PDF on Submit Settings'
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "Enabled For"
msgstr ""

#. Label of a Link field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Letter Head"
msgstr ""

#. Description of the 'Auto Name' (Data) field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid ""
"Naming Options:\n"
"<ol><li><b>format:EXAMPLE-{MM}-{fieldname1}-{fieldname2}-{#####}</b> - Replace all braced words (fieldnames, date words (DD, MM, YY), series) with their value. Outside braces, any characters can be used.</li></ol>"
msgstr ""

#. Name of a DocType
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "PDF on Submit Settings"
msgstr ""

#. Label of a Link field in DocType 'Enabled DocType'
#: pdf_on_submit/doctype/enabled_doctype/enabled_doctype.json
msgid "Print Format"
msgstr ""

#. Name of a role
#: pdf_on_submit/doctype/pdf_on_submit_settings/pdf_on_submit_settings.json
msgid "System Manager"
msgstr ""

This file was deleted.

3 changes: 3 additions & 0 deletions pdf_on_submit/tests/test_pdf_on_submit.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2023, Raffael Meyer and contributors
# For license information, please see license.txt

import frappe
from frappe.tests.utils import FrappeTestCase

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-

from pdf_on_submit import __version__ as version
from setuptools import find_packages, setup

Expand Down

0 comments on commit cc457bb

Please sign in to comment.