Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDEA] Remove flags in language plugins #8837

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions core/acknowledgements.tid
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ TiddlyWiki incorporates code from these fine OpenSource projects:
* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]
* [[The Jasmine JavaScript Test Framework|https://jasmine.github.io/]]
* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]

And media from these projects:

* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]
5 changes: 5 additions & 0 deletions core/images/language.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: $:/core/images/language
tags: $:/tags/Image

\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-language tc-image-button" viewBox="0 0 92 92"><path d="M0 0h2480.32v3507.87H0z" style="fill:none" transform="scale(.03696 .02613)"/><path d="M71.508 62.298c-1.243 15.83-16.758 28.344-35.714 28.344-5.713 0-11.113-1.136-15.905-3.158-2.977 2.498-8.618 4.183-15.088 4.183-.929 0-1.84-.034-2.73-.102 4.499-1.5 7.989-4.886 9.298-9.099C4.373 76.918 0 69.016 0 60.246 0 49.773 6.237 40.537 15.729 35.07c1.235 7.764 5.492 14.713 11.724 19.953l-7.269 18.453c-.393.976-.676 1.737-.847 2.285a5.326 5.326 0 0 0-.256 1.591c0 .89.368 1.686 1.103 2.388.736.702 1.583 1.052 2.542 1.052 1.13 0 1.942-.33 2.438-.988.497-.659 1.096-1.93 1.797-3.812l1.797-4.826h15.3l1.797 4.723c.239.582.526 1.254.86 2.015.333.762.646 1.327.936 1.695.291.368.65.659 1.078.873.428.213.942.32 1.54.32a3.586 3.586 0 0 0 2.632-1.09c.727-.728 1.09-1.528 1.09-2.4 0-.84-.384-2.183-1.154-4.031l-3.545-8.755c2.142.3 4.34.455 6.58.455 5.541 0 10.824-.951 15.636-2.674Zm-30.563.247 1.059 2.898H30.76l2.32-6.467a43.152 43.152 0 0 0 7.865 3.569Z"/><path d="M71.778 57.635c-4.793 2.023-10.191 3.157-15.907 3.157-19.767 0-35.793-13.61-35.793-30.396S36.104.001 55.87.001c19.772 0 35.797 13.61 35.797 30.395 0 8.77-4.373 16.674-11.371 22.221 1.309 4.211 4.8 7.6 9.299 9.1-.89.067-1.802.1-2.73.1-6.47 0-12.11-1.686-15.088-4.182Zm-15.59-15.887a44.237 44.237 0 0 0 3.3 2.496c4.284 2.942 9.06 5.381 14.33 7.315l2.334-3.517c-5.134-1.871-9.696-4.125-13.69-6.763a42.558 42.558 0 0 1-3.37-2.483c4.247-4.806 7.374-10.43 9.38-16.869h6.698V17.78h-16.7a47.226 47.226 0 0 0-1.528-2.959 52.943 52.943 0 0 0-2.885-4.562l-4.218 1.554a36.467 36.467 0 0 1 2.971 3.983c.427.661.833 1.323 1.217 1.984H36.394v4.148h6.77a36.878 36.878 0 0 0 5.422 11.56 42.918 42.918 0 0 0 4.591 5.497c-4.687 4.017-10.548 6.932-17.582 8.744l2.247 3.709c7.746-2.44 13.861-5.67 18.347-9.689Zm-9.047-19.82h16.991c-1.86 5.668-4.528 10.402-8 14.204a42.526 42.526 0 0 1-4.247-4.922c-2.126-2.883-3.71-5.977-4.744-9.283Z"/></svg>
13 changes: 0 additions & 13 deletions core/language/en-GB/icon.tid

This file was deleted.

6 changes: 1 addition & 5 deletions core/ui/PageControls/language.tid
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ description: {{$:/language/Buttons/Language/Hint}}
<span class="tc-popup-keep">
<$button popup=<<qualify "$:/state/popup/language">> tooltip={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<%if [<tv-config-toolbar-icons>match[yes]] %>
<span class="tc-image-button">
<$set name="languagePluginTitle" value={{$:/language}}>
<$image source=`$(languagePluginTitle)$/icon`/>
</$set>
</span>
{{$:/core/images/language}}
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Language/Caption}}/></span>
Expand Down
17 changes: 2 additions & 15 deletions core/wiki/languageswitcher.tid
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
title: $:/snippets/languageswitcher

\define flag-title()
$(languagePluginTitle)$/icon
\end
\whitespace trim

<$linkcatcher to="$:/language">
<div class="tc-chooser tc-language-chooser">
<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[description]]">
<$set name="cls" filter="[all[current]field:title{$:/language}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>>
<$set name="cls" filter="[all[current]field:title{$:/language}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
<div class=<<cls>> lang={{!!name}}>
<$link>
<span class="tc-image-button">
<$set name="languagePluginTitle" value=<<currentTiddler>>>
<$transclude subtiddler=<<flag-title>>>
<$list filter="[all[current]field:title[$:/languages/en-GB]]">
<$transclude tiddler="$:/languages/en-GB/icon"/>
</$list>
</$transclude>
</$set>
</span>
&#32;
<$view field="description">
<$view field="name">
<$view field="title"/>
Expand Down
1 change: 0 additions & 1 deletion editions/translators/tiddlers/Extracting Translations.tid
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Use this procedure if the language being submitted is not already present in the
# Create the new language folder `languages/xx-XX`
# Copy the language files into the language folder
# Create a `plugin.info` file for the translation
# Create an appropriate flag image in `icon.tid`
# Add the new language to tw5.com
# Submit a pull request

Expand Down
202 changes: 0 additions & 202 deletions editions/tw5.com/tiddlers/images/external/tiddlywiki.files

This file was deleted.

25 changes: 0 additions & 25 deletions editions/tw5.com/tiddlers/languages/LanguageGallery.tid

This file was deleted.

34 changes: 34 additions & 0 deletions editions/tw5.com/tiddlywiki.info
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,40 @@
"tiddlywiki/readonly"
],
"languages": [
"ar-PS",
"ca-ES",
"cs-CZ",
"da-DK",
"de-AT",
"de-CH",
"de-DE",
"el-GR",
"en-PH",
"en-US",
"es-ES",
"fa-IR",
"fr-FR",
"he-IL",
"hi-IN",
"ia-IA",
"it-IT",
"ja-JP",
"ko-KR",
"mk-MK",
"nl-NL",
"pa-IN",
"pl-PL",
"pt-BR",
"pt-PT",
"ru-RU",
"sk-SK",
"sl-SI",
"sv-SE",
"zh-CN",
"zh-HK",
"zh-Hans",
"zh-Hant",
"zh-TW"
],
"build": {
"index": [
Expand Down
7 changes: 0 additions & 7 deletions languages/ar-PS/icon.tid

This file was deleted.

8 changes: 0 additions & 8 deletions languages/ca-ES/icon.tid

This file was deleted.

9 changes: 0 additions & 9 deletions languages/cs-CZ/icon.tid

This file was deleted.

9 changes: 0 additions & 9 deletions languages/da-DK/icon.tid

This file was deleted.

8 changes: 0 additions & 8 deletions languages/de-AT/icon.tid

This file was deleted.

Loading
Loading