Skip to content

Commit

Permalink
Remove broken po translation
Browse files Browse the repository at this point in the history
  • Loading branch information
niccokunzmann committed May 25, 2024
1 parent 6e4a6cd commit a707bed
Show file tree
Hide file tree
Showing 12 changed files with 329 additions and 110 deletions.
2 changes: 2 additions & 0 deletions docs-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ mkdocs-meta-descriptions-plugin
#mkdocs-mdpo-plugin
git+https://github.com/niccokunzmann/mkdocs-mdpo-plugin.git@patch-1
mkdocs-material-relative-language-selector

mkdocs-exclude
3 changes: 3 additions & 0 deletions docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ mergedeep==1.3.4
mkdocs[i18n]==1.5.3
# via
# -r docs-requirements.in
# mkdocs-exclude
# mkdocs-git-revision-date-localized-plugin
# mkdocs-macros-plugin
# mkdocs-markdownextradata-plugin
# mkdocs-material
# mkdocs-meta-descriptions-plugin
# mkdocs-rss-plugin
mkdocs-exclude==1.0.2
# via -r docs-requirements.in
mkdocs-git-revision-date-localized-plugin==1.2.5
# via -r docs-requirements.in
mkdocs-macros-plugin==1.0.5
Expand Down
19 changes: 16 additions & 3 deletions docs/dev/maintain.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,17 @@ To release a new version:
We might add more Markdown documentation files to the [Weblate translation]({{link.weblate}}).
The aim of this section is to have a consistent outcome.

1. Create a new component and copy it from the `documentation-index` component (Getting Started).
1. Create a component **From existing component**, the `index.html`.

- Use the page title as **title** like `Documentation - Getting Started`
- Use file name as **slug** like `documentation-index`

2. Add Flags, example link: https://hosted.weblate.org/settings/open-web-calendar/documentation-index/#translation
2. Choose the right `gettext PO file (monolingual)`.
3. Set the **Repository browser** to the right URL, replace `index.md`: `https://github.com/niccokunzmann/open-web-calendar/blob/{{branch}}/docs/index.md?plain=1#L{{line}}`
4. For **Translation license** choose `Create Commons Attribution Share Alike 4.0 International`.
5. Save.

6. Add **Flags**, example link: https://hosted.weblate.org/settings/open-web-calendar/documentation-index/#translation

- add `md-text,safe-html` as **Translation flags**
- choose **Enforced checks**:
Expand All @@ -83,7 +88,7 @@ The aim of this section is to have a consistent outcome.
- Markdown syntax
- Unsafe HTML

3. Upload a **screenshot** of the page
7. Upload a **screenshot** of the page

- Restrict width and height to 2000px

Expand All @@ -93,3 +98,11 @@ The aim of this section is to have a consistent outcome.

- Click on the empty **Search** button
- Add all strings to it

8. Clear any component alerts.

These component Add-Ons are automatically installed: ([Page](https://hosted.weblate.org/addons/open-web-calendar/))

- Cleanup translation files
- Contributors in comment
- Add missing languages
30 changes: 30 additions & 0 deletions docs/snippets/choose-timezone.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
This is HTML and JavaScript that allows changing a calendar URL specific to a timezone.
TODO: Choose the time zones that you want the viewer to choose:
-->
<select id="timezoneOption"><option value="America/New_York">New York</option><option value="Europe/London">London</option><option value="Asia/Singapore">Singapore</option><option value="">My Local Time Zone</option></select>

<script>
// TODO: Set the iframe id:
var calendarIFrameID = "owcTimezoneExample";
var originalUrl; // the oririginal URL of the iframe
var calendarIFrame; // the stored iframe as a variable

// Save the original URL
function setInitialTimezone() {
calendarIFrame = document.getElementById(calendarIFrameID);
originalUrl = calendarIFrame.src;
changeTimezone();
}

// Change to the selected timezone
function changeTimezone() {
console.log("change timezone: " + timezoneOption.value);
calendarIFrame.src = originalUrl + (timezoneOption.value ? "timezone=" + timezoneOption.value : "");
console.log("url: " + calendarIFrame.src);
}

window.addEventListener("load", setInitialTimezone);
timezoneOption.onchange = changeTimezone;
</script>
31 changes: 10 additions & 21 deletions docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,21 @@ Modifications:

- [proxy parameters](host/self.md#ssrf-protection-with-a-proxy-server)

## Timezones
## Choose Timezones

The calendar allows choosing the time zone that the events are displayed in.
Whether you have a local website or an international calendar, all is possible.
It is also fairly easy to customize with JavaScript.
You can edit the page to see how it is done.
For an international calendar, you can allow choosing the time zone that the
events are displayed in.

<select id="timezoneOption">
<option value="America/New_York">New York</option>
<option value="Europe/London">London</option>
<option value="Asia/Singapore">Singapore</option>
<option value="">My Time Zone</option>
</select>
--8<-- "choose-timezone.html"

{{calendar_iframe("timezone-example.json", id="owcTimezoneExample")}}

<script>
const originalUrl = owcTimezoneExample.src;
function changeTimezone() {
console.log("change timezone: " + timezoneOption.value);
owcTimezoneExample.src = originalUrl + (timezoneOption.value ? "timezone=" + timezoneOption.value : "");
console.log("url: " + owcTimezoneExample.src);
}
changeTimezone();
timezoneOption.onchange = changeTimezone;
</script>
Below, you can see the source code that you need to add to your website.
You might need to adjust the timezone selection and the id of the iframe.

```
--8<-- "choose-timezone.html"
```

Modifications:

Expand Down
26 changes: 16 additions & 10 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ theme:
# - navigation.instant
# - navigation.tracking
- toc.follow
- content.code.copy
icon:
edit: material/pencil
view: material/eye
Expand Down Expand Up @@ -127,7 +128,11 @@ plugins:
# enable_creation_date: true
# do not use the language selector
# - material-relative-language-selector

# snippets and exclude from https://pypi.org/project/mkdocs-snippets/
- exclude:
glob:
- snippets/*
# - snippets

extra: # language support, see https://squidfunk.github.io/mkdocs-material/setup/changing-the-language/
social:
Expand Down Expand Up @@ -217,14 +222,15 @@ markdown_extensions:
- pymdownx.inlinehilite # see https://mrkeo.github.io/reference/code-blocks/#inlinehilite
- pymdownx.details # see https://facelessuser.github.io/pymdown-extensions/extensions/details/
- abbr
- pymdownx.snippets # see https://facelessuser.github.io/pymdown-extensions/extensions/snippets/
- pymdownx.snippets: # see https://facelessuser.github.io/pymdown-extensions/extensions/snippets/
base_path: ["docs/snippets"]
- attr_list # see https://mrkeo.github.io/reference/images/

extra_css:
- css/code-blocks.css
extra_javascript:
- js/popper.js
- js/jquery-3.7.1.min.js
- js/tippy.js
- js/clipboard.min.js
- js/code-blocks.js
#extra_css:
# - css/code-blocks.css
#extra_javascript:
# - js/popper.js
# - js/jquery-3.7.1.min.js
# - js/tippy.js
# - js/clipboard.min.js
# - js/code-blocks.js
9 changes: 9 additions & 0 deletions translations/de/LC_MESSAGES/_compendium.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ msgstr ""
msgid "Permanent link"
msgstr ""

#~ msgid "Cleanup translation files"
#~ msgstr ""

#~ msgid "Contributors in comment"
#~ msgstr ""

#~ msgid "Add missing languages"
#~ msgstr ""

#~ msgid "Development"
#~ msgstr ""

Expand Down
65 changes: 55 additions & 10 deletions translations/de/LC_MESSAGES/dev/maintain.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,12 @@ msgid ""
"of this section is to have a consistent outcome."
msgstr ""

msgid ""
"Create a new component and copy it from the `documentation-index` component "
"(Getting Started)."
msgstr ""

msgid "Use the page title as **title** like `Documentation - Getting Started`"
msgstr ""

msgid "Use file name as **slug** like `documentation-index`"
msgstr ""

msgid ""
"Add Flags, example link: https://hosted.weblate.org/settings/open-web-"
"calendar/documentation-index/#translation"
msgstr ""

msgid "add `md-text,safe-html` as **Translation flags**"
msgstr ""

Expand Down Expand Up @@ -131,6 +121,61 @@ msgstr ""
msgid "Restrict width and height to 2000px wzxhzdk:2"
msgstr ""

msgid "Create a component **From existing component**, the `index.html`."
msgstr ""

msgid "Choose the right `gettext PO file (monolingual)`."
msgstr ""

msgid ""
"Set the **Repository browser** to the right URL, replace `index.md`: "
"`https://github.com/niccokunzmann/open-web-calendar/blob/{{ branch "
"}}/docs/index.md?plain=1#L{{ line }}`"
msgstr ""

msgid ""
"For **Translation license** choose `Create Commons Attribution Share Alike "
"4.0 International`."
msgstr ""

msgid "Save."
msgstr ""

msgid ""
"Add **Flags**, example link: https://hosted.weblate.org/settings/open-web-"
"calendar/documentation-index/#translation"
msgstr ""

msgid "Clear any component alerts."
msgstr ""

msgid ""
"These component Add-Ons are automatically installed: "
"([Page](https://hosted.weblate.org/addons/open-web-calendar/))"
msgstr ""

msgid "Cleanup translation files"
msgstr ""

msgid "Contributors in comment"
msgstr ""

msgid "Add missing languages"
msgstr ""

#~ msgid "Add **components**:"
#~ msgstr ""

#~ msgid ""
#~ "Create a new component and copy it from the `documentation-index` component "
#~ "(Getting Started)."
#~ msgstr ""

#~ msgid ""
#~ "Add Flags, example link: https://hosted.weblate.org/settings/open-web-"
#~ "calendar/documentation-index/#translation"
#~ msgstr ""

#~ msgid "Notify issues and pull requests about the release."
#~ msgstr ""

Expand Down
77 changes: 61 additions & 16 deletions translations/de/LC_MESSAGES/templates.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ msgstr ""
msgid "[proxy parameters](host/self.md#ssrf-protection-with-a-proxy-server)"
msgstr ""

msgid "Timezones"
msgstr ""

msgid ""
"The calendar allows choosing the time zone that the events are displayed in."
" Whether you have a local website or an international calendar, all is "
"possible. It is also fairly easy to customize with JavaScript. You can edit "
"the page to see how it is done."
msgstr ""

msgid "JavaScript"
msgstr ""

Expand Down Expand Up @@ -126,12 +116,6 @@ msgid ""
"target=\"_blank\">Edit the calendar</a>"
msgstr ""

msgid "<select id=\"timezoneOption\"> wzxhzdk:3"
msgstr ""

msgid "</select>"
msgstr ""

msgid ""
"<a href=\"https://open-web-"
"calendar.hosted.quelltext.eu/index.html?specification_url=https://open-web-"
Expand All @@ -145,3 +129,64 @@ msgid ""
"calendar.quelltext.eu/assets/templates/free-and-busy.json\" "
"target=\"_blank\">Edit the calendar</a>"
msgstr ""

msgid ""
"Below, you can see the source code that you need to add to your website. You"
" might need to adjust the timezone selection and the id of the iframe."
msgstr ""

msgid ""
"For an international calendar, you can allow choosing the time zone that the"
" events are displayed in."
msgstr ""

msgid "Choose Timezones"
msgstr ""

msgid ""
"<select id=\"timezoneOption\"><option value=\"America/New_York\">New "
"York</option><option value=\"Europe/London\">London</option><option "
"value=\"Asia/Singapore\">Singapore</option><option value=\"\">My Local Time "
"Zone</option></select>"
msgstr ""

#~ msgid "<select id=\"timezoneOption\"></select>"
#~ msgstr ""

#~ msgid "</select>"
#~ msgstr ""

#~ msgid "<select id=\"timezoneOption\"> wzxhzdk:5"
#~ msgstr ""

#~ msgid "Timezones"
#~ msgstr ""

#~ msgid ""
#~ "The calendar allows choosing the time zone that the events are displayed in."
#~ " Whether you have a local website or an international calendar, all is "
#~ "possible. It is possible to customize with JavaScript."
#~ msgstr ""

#~ msgid ""
#~ "The calendar allows choosing the time zone that the events are displayed in."
#~ " Whether you have a local website or an international calendar, all is "
#~ "possible. It is also fairly easy to customize with JavaScript."
#~ msgstr ""

#~ msgid ""
#~ "Here, you can see the source code that you need to add to your website:"
#~ msgstr ""

#~ msgid ""
#~ "The calendar allows choosing the time zone that the events are displayed in."
#~ " Whether you have a local website or an international calendar, all is "
#~ "possible. It is also fairly easy to customize with JavaScript. You can edit "
#~ "the page to see how it is done."
#~ msgstr ""

#~ msgid "<select id=\"timezoneOption\"> wzxhzdk:3"
#~ msgstr ""

#~ msgid "<select id=\"timezoneOption\"> wzxhzdk:6"
#~ msgstr ""
9 changes: 9 additions & 0 deletions translations/en/LC_MESSAGES/_compendium.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ msgstr ""
msgid "Permanent link"
msgstr ""

#~ msgid "Cleanup translation files"
#~ msgstr ""

#~ msgid "Contributors in comment"
#~ msgstr ""

#~ msgid "Add missing languages"
#~ msgstr ""

#~ msgid "Development"
#~ msgstr ""

Expand Down
Loading

0 comments on commit a707bed

Please sign in to comment.