Skip to content

Instantly share code, notes, and snippets.

View pavanjoshi914's full-sized avatar
🚩

Pavan Joshi pavanjoshi914

🚩
View GitHub Profile
@pavanjoshi914
pavanjoshi914 / structuring_of_metadata.md
Last active June 24, 2022 07:18
Using Schema.org for structuring of Bitcoin Transaction Metadata

Introduction

Schema.org basically provides structuring of data for marking up of websites, but we can use same rules for structuring of metadata for our purpose instead of creating new set of specifications for structuring.

Schema.org JSON-LD format

Schema.org provides variety of schema to give structure to the data, in variety of formats. one of the important format we can use for structuring of metadata is JSON-LD format

{
  "@context": "https://schema.org",
  "@type": "AudioObject",
Scaffold(
floatingActionButton: buildSaveDeletebutton()
);
@pavanjoshi914
pavanjoshi914 / chatbot.md
Created December 2, 2021 17:35
Chatbot

intents.json

{"intents": [
        {"tag": "greeting",
         "patterns": ["Hi there", "How are you", "Is anyone there?","Hey","Hola", "Hello", "Good day"],
         "responses": ["Hello, thanks for asking", "Good to see you again", "Hi there, how can I help?"],
         "context": [""]
        },
        {"tag": "goodbye",
@pavanjoshi914
pavanjoshi914 / gist:fbd6ce04fe46dddfb6a4248f32391c95
Created July 8, 2021 07:57
Curated list of locale and their language name
[
["English", "en"],
["Portuguese", "pt"],
["Japanese", "ja"],
["Swedish", "sv"],
["German", "de"],
["Bulgarian", "bg"],
["Turkish", "tr"],
["Indonesian", "id"],
["French", "fr"],
@pavanjoshi914
pavanjoshi914 / views.md
Last active June 19, 2021 12:32
I18n rules

Rules for designing directory structure for I18n

  • we support nested directory structure, all the yml files belonging to views should be stored in config/locales/views folder
  • Further nesting should be done following similar codebase structure.

Some of the cases that occur more frequently

  • case1:

If there is single file in module we dont include erb name for file. here we use view_folder_name: i.e about: as a top level namespace

@pavanjoshi914
pavanjoshi914 / gist:d5523248a3e51cea0c07a4e47c080d1e
Last active April 13, 2021 10:09
Comparison between different backends for model translations

Difference between different Backends

Column Backend

  • Creation of localized version of each attribute
  • eg: title_en, title_fr, title_ja,
  • mobility supports this using :column backend

Disadvantages

  • not scalable when we support large number of locales due to increase in number of columns in the database
  • Every time migration is required to introduce new attrbiute or locale

Table Backend

  • Each model will have its separate translation model
@pavanjoshi914
pavanjoshi914 / gist:1cebce0f55539be221473abd04aaceaf
Last active February 28, 2022 14:26
Comparison of different Jekyll plugins

Popularly known Jekyll I18n plugins are Jekyll-multiple-language plugin, Jekyll-polyglot, Jekyll-I18n

Maintenance of different plugins for I18n support

Jekyll-I18n

Jekyll-I18n enables basic level support for I18n but is no longer maintained anymore and cant' be used for proper I18n support for Interactive-Book.

Jekyll multiple language plugin

  • Jekyll-multiple-language-plugin is a traditional plugin to provide I18n in Jekyll.
  • It is also a properly maintained plugin with the latest stable release but follows more manual approach.
@pavanjoshi914
pavanjoshi914 / circuitversedocs.md
Last active March 22, 2021 01:44
i18n for circuitversedocs

I18n for CircuitVerseDocs

Overview

Currently circuitversedocs is made using Docsifyjs documentation site generator which can be internationalised easily.

structure of i18n

  • use different repositories for each language.
  • use same repository with subfolders for each language.

different sections we have to work on

@pavanjoshi914
pavanjoshi914 / jekyll.md
Last active March 22, 2021 01:45
Internationalization of interactive book (for jekyll framework)

jekyll dont provide any official documentation for internationalization,below info generated by reading docs of different jekyll multilangual plugins

jekyll plugins

more popular i18n plugns for jekyll are jekyll multiple language plugin ,jekyll-polygot, jekyll-i18n.

jekyll and githubpages

list of supported plugins is given here which does not indclude any of the i18n plugin.but by having CI setup can make unsupported plugin work for us.

there is no native i18n support provided by jekyll,but can be achieved through plugins or by providing i18n support from scratch.