| 
									
										
										
										
											2023-04-07 02:45:34 +02:00
										 |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  |   import Locale from "../i18n/Locale" | 
					
						
							|  |  |  |   import LinkToWeblate from "./LinkToWeblate" | 
					
						
							| 
									
										
										
										
											2023-04-07 02:45:34 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Shows a small icon which will open up weblate; a contributor can translate the item for 'context' there | 
					
						
							|  |  |  |    */ | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  |   export let context: string | 
					
						
							| 
									
										
										
										
											2023-04-07 02:45:34 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  |   let linkToWeblate = Locale.showLinkToWeblate | 
					
						
							|  |  |  |   let linkOnMobile = Locale.showLinkOnMobile | 
					
						
							|  |  |  |   let language = Locale.language | 
					
						
							| 
									
										
										
										
											2023-04-07 02:45:34 +02:00
										 |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-30 23:45:30 +02:00
										 |  |  | {#if !!context && context.indexOf(":") > 0} | 
					
						
							| 
									
										
										
										
											2023-04-07 02:45:34 +02:00
										 |  |  |   {#if $linkOnMobile} | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  |     <a | 
					
						
							|  |  |  |       href={LinkToWeblate.hrefToWeblate($language, context)} | 
					
						
							|  |  |  |       target="_blank" | 
					
						
							| 
									
										
										
										
											2023-06-14 20:44:01 +02:00
										 |  |  |       class="weblate-link mx-1" | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  |     > | 
					
						
							| 
									
										
										
										
											2023-05-30 23:45:30 +02:00
										 |  |  |       <img src="./assets/svg/translate.svg" class="font-gray" /> | 
					
						
							| 
									
										
										
										
											2023-04-07 02:45:34 +02:00
										 |  |  |     </a> | 
					
						
							|  |  |  |   {:else if $linkToWeblate} | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  |     <a | 
					
						
							|  |  |  |       href={LinkToWeblate.hrefToWeblate($language, context)} | 
					
						
							|  |  |  |       class="weblate-link hidden-on-mobile mx-1" | 
					
						
							|  |  |  |       target="_blank" | 
					
						
							|  |  |  |     > | 
					
						
							| 
									
										
										
										
											2023-05-30 23:45:30 +02:00
										 |  |  |       <img src="./assets/svg/translate.svg" class="font-gray inline-block" /> | 
					
						
							| 
									
										
										
										
											2023-04-07 02:45:34 +02:00
										 |  |  |     </a> | 
					
						
							|  |  |  |   {/if} | 
					
						
							|  |  |  | {/if} |