[{"created":"20220225151005339","text":"\\define tTitles() $:/C.data.Titles\n\n<$button>\n<$list filter=\"[<tTitles>indexes[]sort[]]\" variable=\"cpt\">\n<$let\n  myTitle={{{[<tTitles>getindex<cpt>]}}}\n>\n<$action-setfield $tiddler=<<myTitle>> $field=\"C.modified\" $timestamp=\"no\"/>\n<$action-setfield $tiddler=<<myTitle>> $field=\"C.text\" $timestamp=\"no\"/>\n<$action-setfield $tiddler=<<myTitle>> $field=\"C.tags\" $timestamp=\"no\"/>\n</$let>\n</$list>\n<$list filter=\"[has:field[wl-field-name-note]]\">\n<$action-setfield $field=\"wl-field-name-note\" $timestamp=\"no\"/>\n</$list>\n{{$:/core/images/paint}} Clean </$button>","tags":"frTT","title":"$:/C.button-clean-metadata","modified":"20220225151625303"},{"created":"20220223235617011","text":"\\whitespace trim\n\\define makeExportFilter()\n[[$(currentTiddler)$]]\n\\end\n\n\\define cleanupActions()\n<$action-setfield $field=\"C.modified\" $timestamp=\"no\"/>\n<$action-setfield $field=\"C.text\" $timestamp=\"no\"/>\n<$action-setfield $field=\"C.tags\" $timestamp=\"no\"/>\n<$action-setfield $field=\"wl-field-name-note\" $timestamp=\"no\"/>\n\\end\n\n<$reveal text={{{ [<currentTiddler>has:field[C.text]then[dirty]else[clean]] }}} type=\"match\" default=\"clean\"><$macrocall $name=\"exportButton\" exportFilter=<<makeExportFilter>> baseFilename=<<currentTiddler>> /></$reveal>\n<$reveal text={{{ [<currentTiddler>has:field[C.text]then[dirty]else[clean]] }}} type=\"match\" default=\"dirty\"><$button class=\"tc-btn-invisible\" actions=<<cleanupActions>>>{{$:/core/images/paint}}</$button></$reveal>\n","title":"$:/C.button-export-tiddler","caption":"{{$:/core/images/export-button}}","modified":"20220304153135963","tags":"frTT","type":"text/vnd.tiddlywiki"},{"created":"20220225152347617","text":"<$let tv-config-toolbar-text=\"no\" tv-config-toolbar-class=\"\">{{$:/core/ui/Buttons/import}}</$let>","modified":"20220225224326531","title":"$:/C.button-import","tags":"frTT"},{"created":"20220225223835855","text":"<$button to=\"$:/C.tool-not-translated-yet\">🇬🇧</$button>","tags":"frTT","title":"$:/C.button-not-translated-yet","modified":"20220225224006560"},{"created":"20220225223518496","text":"<$button to=\"$:/C.tool-outdated-translations\">⏰</$button>","tags":"frTT","title":"$:/C.button-outdated","modified":"20220225223702107"},{"created":"20220225154207620","text":"<$button to=\"frTT readme\">{{$:/core/images/help}}</$button>","tags":"frTT","title":"$:/C.button-readme","modified":"20220225154926987"},{"created":"20220225151731014","text":"\\define tTitles() $:/C.data.Titles\n\\define tModified() $:/C.data.Modified\n\\define tText() $:/C.data.Text\n\\define tTags() $:/C.data.Tags\n\n<$button>\n<$list filter=\"[<tTitles>indexes[]sort[]]\" variable=\"cpt\">\n<$let\n  myTitle={{{[<tTitles>getindex<cpt>]}}}\n  myMDate={{{[<tModified>getindex<cpt>]}}}\n  myText={{{[<tText>getindex<cpt>]}}}\n  myTags={{{[<tTags>getindex<cpt>]}}}\n>\n<$action-setfield $tiddler=<<myTitle>> $field=\"C.modified\" $value=<<myMDate>> $timestamp=\"no\"/>\n<$action-setfield $tiddler=<<myTitle>> $field=\"C.text\" $value=<<myText>> $timestamp=\"no\"/>\n<$action-setfield $tiddler=<<myTitle>> $field=\"C.tags\" $value=<<myTags>> $timestamp=\"no\"/>\n</$let>\n</$list>\n{{$:/core/images/download-button}} Store </$button>","tags":"frTT","title":"$:/C.button-store-metadata","modified":"20220225152228063"},{"created":"20220304154625525","text":"\\whitespace trim\n\\define removeFromList()\n<$action-listops $tiddler=\"frTT Translation list\" $field=\"text\" $subfilter=\"-[<currentTiddler>]\"/>\n\\end\n\n<$button class=\"tc-btn-invisible\" actions=<<removeFromList>>>{{$:/core/images/cancel-button}}</$button>","title":"$:/C.button-todo-remove","modified":"20220304205557621","tags":"frTT"},{"created":"20220304171842529","text":"<svg width=\"22pt\" height=\"22pt\" class=\"tc-image-cui-cil-library-add tc-image-button\" viewBox=\"0 0 512 512\"><path fill=\"var(--ci-primary-color, currentColor)\" d=\"M48,464V144H16V472a24.027,24.027,0,0,0,24,24H368V464H48Z\"/><path fill=\"var(--ci-primary-color, currentColor)\" d=\"M144,400H112V80H80V408a24.027,24.027,0,0,0,24,24H432V400H144Z\"/><path fill=\"var(--ci-primary-color, currentColor)\" d=\"M472,16H168a24.027,24.027,0,0,0-24,24V344a24.027,24.027,0,0,0,24,24H472a24.027,24.027,0,0,0,24-24V40A24.027,24.027,0,0,0,472,16Zm-8,320H176V48H464Z\"/><polygon fill=\"var(--ci-primary-color, currentColor)\" points=\"304 288 336 288 336 204 420 204 420 172 336 172 336 88 304 88 304 172 220 172 220 204 304 204 304 288\"/></svg>","title":"$:/C.icon-enqueue","tags":"frTT","modified":"20220304172027418"},{"created":"20220225161329968","text":"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14pt\" height=\"14pt\" class=\"tc-image-cui-cil-chat-bubble tc-image-button\" viewBox=\"0 0 512 512\"><path fill=\"var(--ci-primary-color, currentColor)\" d=\"M448.205,392.507c30.519-27.2,47.8-63.455,47.8-101.078,0-39.984-18.718-77.378-52.707-105.3C410.218,158.963,366.432,144,320,144s-90.218,14.963-123.293,42.131C162.718,214.051,144,251.445,144,291.429s18.718,77.378,52.707,105.3c33.075,27.168,76.861,42.13,123.293,42.13,6.187,0,12.412-.273,18.585-.816l10.546,9.141A199.849,199.849,0,0,0,480,496h16V461.943l-4.686-4.685A199.17,199.17,0,0,1,448.205,392.507ZM370.089,423l-21.161-18.341-7.056.865A180.275,180.275,0,0,1,320,406.857c-79.4,0-144-51.781-144-115.428S240.6,176,320,176s144,51.781,144,115.429c0,31.71-15.82,61.314-44.546,83.358l-9.215,7.071,4.252,12.035a231.287,231.287,0,0,0,37.882,67.817A167.839,167.839,0,0,1,370.089,423Z\"></path><path fill=\"var(--ci-primary-color, currentColor)\" d=\"M60.185,317.476a220.491,220.491,0,0,0,34.808-63.023l4.22-11.975-9.207-7.066C62.918,214.626,48,186.728,48,156.857,48,96.833,109.009,48,184,48c55.168,0,102.767,26.43,124.077,64.3,3.957-.192,7.931-.3,11.923-.3q12.027,0,23.834,1.167c-8.235-21.335-22.537-40.811-42.2-56.961C270.072,30.279,228.3,16,184,16S97.928,30.279,66.364,56.206C33.886,82.885,16,118.63,16,156.857c0,35.8,16.352,70.295,45.25,96.243a188.4,188.4,0,0,1-40.563,60.729L16,318.515V352H32a190.643,190.643,0,0,0,85.231-20.125,157.3,157.3,0,0,1-5.071-33.645A158.729,158.729,0,0,1,60.185,317.476Z\"></path></svg>","tags":"frTT","title":"$:/C.icon-frTT","modified":"20220225162939465"},{"created":"20220223213452952","text":"\\define filter() [all[tiddlers]!is[draft]!prefix[$:/]] [all[tiddlers+system]!is[draft]prefix[$:/editions/]] :filter[get[modified]compare:date:gt{$:/C.data.Titles!!created}then<currentTiddler>] +[trim[]]\n\n{{$:/C.button-readme}} {{$:/C.button-import}} {{$:/C.button-store-metadata}} {{$:/C.button-not-translated-yet}} {{$:/C.button-outdated}} {{$:/C.button-clean-metadata}}\n\n{{$:/C.warning-dirty-metadata}}\n---\n\n<$list filter=<<filter>>>\n{{||$:/C.button-export-tiddler}} <$link to=<<currentTiddler>>/><br/>\n</$list>\n\n---\n{{$:/C.translation-todo-list}}","tags":"frTT $:/tags/SideBar","title":"$:/C.sidebar-tab-tools","modified":"20220305105159947","caption":"{{$:/C.icon-frTT}} frTT","icon":"$:/favicon.ico"},{"created":"20220212230151145","text":"[has[modified]has[C.modified]get[modified]compare:date:lt{!!C.modified}then[$:/C.title-when-outdated]]\n[has[modified]has[C.modified]get[modified]compare:date:eq{!!C.modified}then[$:/C.title-when-original]]\n","title":"$:/C.title-filter-for-translation","tags":"$:/tags/ViewTemplateTitleFilter frTT","modified":"20220218130738428","list-before":"$:/config/ViewTemplateTitleFilters/default"},{"created":"20220217122534776","text":"\\whitespace trim\n<h2 class=\"tc-title\">\n🆘🇬🇧 &nbsp;<$view field=\"title\"/> &nbsp;🇬🇧🆘\n</h2>\n","title":"$:/C.title-when-original","tags":"frTT","modified":"20220218130719876"},{"created":"20220212231220734","text":"\\whitespace trim\n<h2 class=\"tc-title\">\n🆘⏰ &nbsp;<$view field=\"fr-title\"><$view field=\"title\"/></$view> &nbsp;⏰🆘\n</h2>\n","title":"$:/C.title-when-outdated","tags":"frTT","modified":"20220218130914663"},{"created":"20220225221817806","text":"\\define todofilter() [has[modified]has[C.modified]] :filter[get[modified]compare:date:eq{!!C.modified}]\n\n<style>.translations {\n\tborder: 1px solid <<colour message-border>>;\n\tpadding: 1em;\n\theight: 400px;\n\tposition: relative;\n}</style>\n\n! Not translated yet\n\nPick one of the <$text text={{{ [has[modified]has[C.modified]] :filter[get[modified]compare:date:eq{!!C.modified}] :reduce[<length>] }}}\n /> tiddlers in need of translation:\n\n<$scrollable class=\"translations\">\n\n<$list filter=<<todofilter>>/>\n\n</$scrollable>","tags":"frTT","title":"$:/C.tool-not-translated-yet","modified":"20220225222951798","fr-title":"Les traductions en attente"},{"created":"20220225204201043","text":"\\define latefilter() [has[modified]has[C.modified]] :filter[get[modified]compare:date:lt{!!C.modified}]\n\n<style>.translations {\n\tborder: 1px solid <<colour message-border>>;\n\tpadding: 1em;\n\theight: 400px;\n\tposition: relative;\n}</style>\n\n! Outdated translations\n\nPick one of the <$text text={{{ [has[modified]has[C.modified]] :filter[get[modified]compare:date:lt{!!C.modified}] :reduce[<length>] }}} /> tiddlers in need of update:\n\n<$scrollable class=\"translations\">\n\n<$list filter=<<latefilter>>/>\n\n</$scrollable>","tags":"frTT","title":"$:/C.tool-outdated-translations","modified":"20220225223816677","fr-title":"Les traductions en souffrance"},{"created":"20220304171321263","text":"\\whitespace trim\n\\define enqueueActions() <$action-listops $tiddler=\"frTT Translation list\" $field=\"text\" $subfilter=\"[[$(currentTiddler)$]]\"/>\n<$button actions=<<enqueueActions>> tooltip=\"Add to frTT Translation todo-list\" aria-label=\"Add to frTT Translation todo-list\" class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>match[yes]]\">\n{{$:/C.icon-enqueue}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>match[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\"frTT TODO\"/>\n</span>\n</$list>\n</$button>","title":"$:/C.toolbar-todo-enqueue","tags":"$:/tags/ViewToolbar frTT","caption":"{{$:/C.icon-enqueue}} frTT TODO","description":"Add to frTT Translation todo-list","modified":"20220304210626943","list-before":"$:/core/ui/Buttons/edit"},{"created":"20220304154100810","text":"\\define filter() [[frTT Translation list]get[text]enlist-input[]]\n\n''Translation todo-list:''<br/>\n<$list filter=<<filter>>>\n{{||$:/C.button-todo-remove}} <$link to=<<currentTiddler>>/><br/>\n</$list>\n\n","tags":"frTT","title":"$:/C.translation-todo-list","modified":"20220305105104809"},{"created":"20220225152527904","text":"<$reveal text={{{ [all[tiddlers]has:field[C.text]count[]compare::gt[0]then[dirty]else[clean]] }}} type=\"match\" default=\"dirty\">\n\n!! ⚠️ Clean before exporting! ⚠️\n</$reveal>","tags":"frTT","title":"$:/C.warning-dirty-metadata","modified":"20220225153942594"},{"created":"20220216170659971","text":"C.text","title":"$:/config/wikilabs/field/C.text","description":"English tiddler text","icon":"{{$:/languages/en-GB/icon}}","modified":"20220218224718437","tags":"$:/tags/wikilabs/fieldswitcher frTT","type":"text/vnd.tiddlywiki"},{"created":"20220223213941056","text":"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"22pt\" height=\"22pt\" class=\"tc-image-cui-cil-chat-bubble tc-image-button\" viewBox=\"0 0 512 512\"><path fill=\"var(--ci-primary-color, currentColor)\" d=\"M448.205,392.507c30.519-27.2,47.8-63.455,47.8-101.078,0-39.984-18.718-77.378-52.707-105.3C410.218,158.963,366.432,144,320,144s-90.218,14.963-123.293,42.131C162.718,214.051,144,251.445,144,291.429s18.718,77.378,52.707,105.3c33.075,27.168,76.861,42.13,123.293,42.13,6.187,0,12.412-.273,18.585-.816l10.546,9.141A199.849,199.849,0,0,0,480,496h16V461.943l-4.686-4.685A199.17,199.17,0,0,1,448.205,392.507ZM370.089,423l-21.161-18.341-7.056.865A180.275,180.275,0,0,1,320,406.857c-79.4,0-144-51.781-144-115.428S240.6,176,320,176s144,51.781,144,115.429c0,31.71-15.82,61.314-44.546,83.358l-9.215,7.071,4.252,12.035a231.287,231.287,0,0,0,37.882,67.817A167.839,167.839,0,0,1,370.089,423Z\"></path><path fill=\"var(--ci-primary-color, currentColor)\" d=\"M60.185,317.476a220.491,220.491,0,0,0,34.808-63.023l4.22-11.975-9.207-7.066C62.918,214.626,48,186.728,48,156.857,48,96.833,109.009,48,184,48c55.168,0,102.767,26.43,124.077,64.3,3.957-.192,7.931-.3,11.923-.3q12.027,0,23.834,1.167c-8.235-21.335-22.537-40.811-42.2-56.961C270.072,30.279,228.3,16,184,16S97.928,30.279,66.364,56.206C33.886,82.885,16,118.63,16,156.857c0,35.8,16.352,70.295,45.25,96.243a188.4,188.4,0,0,1-40.563,60.729L16,318.515V352H32a190.643,190.643,0,0,0,85.231-20.125,157.3,157.3,0,0,1-5.071-33.645A158.729,158.729,0,0,1,60.185,317.476Z\"></path></svg>","title":"$:/favicon.ico","tags":"$:/tags/Image frTT","modified":"20220225160854070","type":"image/svg+xml"},{"created":"20220218131606058","text":"\\define icon(_) <span class=\"icon\">{{$_$}}</span>\n\n<style>.icon svg { width: 1em; height: 1em; vertical-align: middle; }</style>\n\n! What is ''frTT'' ?\n\nfrTT is a Translation Toolbox, initially created for French TiddlyWiki documentation translation, hence the name.\n\n! How to use ''frTT''\n\n!! Step 1: get EN metadata\n# Open [[https://tiddlywiki.com]]\n# Import ''frTT'', open tiddler [[Metadata export]] and click its « Go! » button\n# A new <<icon $:/core/images/export-button>> export button appears, click it to export the resulting metadata to a JSON file\n\nYou can now close [[https://tiddlywiki.com]].\n\n!! Step 2: prepare your translation TW\n# Open [[https://tiddlywiki.com/languages/fr-FR/index.html]] (or your favorite language edition). This will be your //Translation TW//.\n# Import ''frTT'' then open the new <<icon $:/C.icon-frTT>> ''frTT'' ~SideBar tab\n# Use the <<icon $:/core/images/import-button>> ''import'' button to import the JSON file exported from [[https://tiddlywiki.com]]\n# If you previously exported a frTT translation TODO, it's the right time to import it back.\n# Use the <<icon $:/core/images/download-button>> ''Store'' button to insert EN metadata into documentation tiddlers \n# Open [[this site by pmario|https://wikilabs.github.io/editions/field-editor/#%24%3A%2Fplugins%2Fwikilabs%2Ffield-visibility:%24%3A%2Fplugins%2Fwikilabs%2Ffield-visibility%20%24%3A%2Fplugins%2Fwikilabs%2Ffield-editor]] and import both plugins: « $:/plugins/wikilabs/field-visibility » and « $:/plugins/wikilabs/field-editor » into your //Translation TW//\n# Everything is ready, so use 🇬🇧 and ⏰ buttons, or the frTT todo-list, to choose a tiddler in need of translation, and go to it!\n# The <<icon $:/C.icon-frTT>> frTT ~SideBar tab provides some useful tools:\n#* The <<icon $:/core/images/help>> help button opens this //frTT readme// tiddler\n#* In order to prevent exported tiddlers to contain unwanted data, a warning message appears until EN metadata is cleaned.\n#* Every tiddler whose modification date is later than EN metadata export date will be listed in the tab\n#** Each of these tiddlers bullet icon indicates its state: \n#**: <<icon $:/core/images/paint>> when the tiddler still contains EN metadata. Click on the icon to remove EN metadata from this tiddler.\n#**: <<icon $:/core/images/export-button>> when the tiddler is clean and ready to export. Click on the icon to export the tiddler.\n#** Please be aware that ''only normal tiddlers'' and ''tiddlers in the `$:/editions/` subtree'' will be listed here, so if you work on system tiddlers you should not forget to export them by yourself!\n#* Below the modified tiddlers, you will find the frTT Translation todo-list.\n#**Use the new frTT <<icon \"$:/C.icon-enqueue\">> ''Enqueue'' ~ViewMode button to add tiddlers there!\n#** When you modify the list, the [[frTT Translation list]] tiddler gets listed with other translated tiddlers, allowing you to export it for your next translation session.\n\n!! Step 3: share the World!\n\n When translations are done:\n\n# In the <<icon $:/C.icon-frTT>> frTT ~SideBar tab, use the <<icon $:/core/images/paint>> ''Clean'' button to remove EN metadata from every tiddler\n# Export each listed tiddler in the <<icon $:/C.icon-frTT>> ''frTT'' ~SideBar tab using its <<icon $:/core/images/export-button>> export button → TID file.\n# You can also export your [[frTT Translation list]] for later reuse.\n# Create a PR in github\n\n\n! Tiddlers bundled in ''frTT'':\n* [[Metadata export]] should be used in [[the English edition|https://tiddlywiki.com]] to export EN metadata.\n* [[frTT readme]]: this readme\n* Both [[$:/C.tool-not-translated-yet]] and [[$:/C.tool-outdated-translations]] list tiddlers in need of translation\n* [[$:/C.button-clean-metadata]], [[$:/C.button-import]], [[$:/C.button-readme]], ...: various buttons used in frTT\n* [[$:/C.sidebar-tab-tools]]: the frTT ~SideBar tab tiddler\n* [[$:/C.toolbar-todo-enqueue]]: The frTT ~ViewMode toolbar button\n* [[$:/C.warning-dirty-metadata]] contains the warning message displayed when translated tiddlers still contain EN metadata\n* [[$:/C.icon-frTT]] is frTT icon. [[$:/C.icon-enqueue]] is used for frTT ~ViewMode toolbar button. Both were borrowed from @morosanuae 's excellent [[TW icons collection|https://morosanuae.github.io/tw-icons/]]\n* [[$:/favicon.ico]]: frTT copies its <<icon $:/C.icon-frTT>> icon to your browser's tab favicon, making it easier to identify your translation ~TiddlyWiki tab if, like me, you have many TW tabs open when working on translations\n\n* [[$:/config/wikilabs/field/C.text]] configures `C.text` field so it's possible to view it side-by-side with `text` when translating a tiddler. See @pmario 's video on using his plugins: https://www.youtube.com/watch?v=aibEiFJvlNk\n* [[$:/C.title-when-outdated]], [[$:/C.title-when-original]] and [[$:/C.title-filter-for-translation]] use the cascades mechanism of TW >=5.2.1 to highlight tiddlers in need of translation/update. \n\n! Thanks\n\nMany thanks to @Jermolene, @pmario, @Mohammad and all the members of TiddlyWiki community.\n\n! License:\n\nThis text and the code bundled in frTT is owned by its respective authors. Everything written by @tw-FRed in this bundle is public domain.\n\n! Changelog\n\n; v0.3\n: Initial release\n\n;v0.3.1\n: [FIX] Individual export bullet button not always working\n\n;v0.4\n: [ADD] Detects modified tiddlers in `$:/editions/` subtree\n: [EXT] Better bullet buttons for translated tiddlers: clean then export\n: [ADD] Translation todo-list + Enqueue ~ViewMode button\n","tags":"frTT","title":"frTT readme","modified":"20220304210244326"},{"created":"20220213235702714","text":"\\define tTitles() $:/C.data.Titles\n\\define tModified() $:/C.data.Modified\n\\define tText() $:/C.data.Text\n\\define tTags() $:/C.data.Tags\n\n! frTT metadata export:\n\nWhen ready to generate metadata click <$button>\n<$list filter=\"[all[tiddlers]!prefix[$]!is[draft]!tag[frTT]sort[]]\" counter=\"cpt\">\n<$action-setfield $tiddler=<<tTitles>> $index=<<cpt>> $value=<<currentTiddler>>/>\n<$action-setfield $tiddler=<<tModified>> $index=<<cpt>> $value={{!!modified}}/>\n<$action-setfield $tiddler=<<tText>> $index=<<cpt>> $value={{!!text}}/>\n<$action-setfield $tiddler=<<tTags>> $index=<<cpt>> $value={{!!tags}}/>\n</$list>\nGo !\n</$button>\n\n<$reveal type=\"match\" text={{{ [<tTitles>has[text]then[ready]] }}} default=\"ready\">\n\nMetadata is ready, get JSON file:  <$macrocall $name=\"exportButton\" exportFilter=\"[prefix[$:/C.data.]]\" baseFilename=\"EN_metadata\" />\n\nThen you can close this ~TiddlyWiki.\n</$reveal>","tags":"frTT","title":"Metadata export","modified":"20220224003513715"}]