Git Product home page Git Product logo

predation's Introduction

Primal Samsara

Repo Brief

Development Repository for the English version of the Primal Samsara webnovel site. Community-driven translation efforts are welcome!

TODO List

Tasks Overview

High Priority Tasks
  • Adding codes for locking specific content. (Chapters/Art/Wiki's)
Medium Priority Tasks
  • Chapter select
Low Priority Tasks
  • Editor/Writer profile enhancements
  • Character profiles development
  • Character reaction images in webnovel
  • Comment filtering system
  • Press Kit creation
  • Primal Market
  • Place for reviews in the Primal Market
Completed Tasks
  • 04/03 Added Support Coffee to footer
  • 04/03 Added Privacy Policy
  • 04/02 Wiki/Gallery section: Hunt
  • 03/24 FAQ section
  • 03/18 Credits page refined
  • 03/14 Added social media links to chapter art credits
Won't Add / Might Add
  • Character profiles development
  • Character reaction images in webnovel
  • Character images within webnovel next to NAME:

Possible Projects

  • Place to put Buddhist and auxiliary philosophy in context with the web novel.

Features that need to move to other production builds.

Reference to know what features are missing in other localizations

  • Larch branch placeholder for images when they don't load from hunt.

Website Localizations

Language Unicode UI Webnovel FAQ Review Status
English en
日本語 ja ✅ 🔍 🔍
한국어 ko ✅ 🔍 🔍
Español es ✅ 🔍 🔍
Français fr ✅ 🔍 🔍
Deutsch de ✅ 🔍 🔍
Italiano it ✅ 🔍 🔍
Português pt ✅ 🔍 🔍
Русский ru ✅ 🔍 🔍
中文 zh ✅ 🔍 🔍
العربية ar ✅ 🔍 🔍
हिन्दी hi ✅ 🔍 🔍
Nederlands nl ✅ 🔍 🔍
Türkçe tr ✅ 🔍 🔍

✅ - Available / Passed Review
✅ 🔍 - Available but there are some localizations missing
??? (No emoji set) - Available but there are markdown issues
❌ - Not Available
🔍 - In Need Of Human Review

Documentation for Community Review for Localization:

'false' can be added to the second element of an array in ../JSON/user_interface, as a flag to let others know this item may potentially be poorly translated, or may not have the intending meaning. For example:

"es": ["¡Capítulo 3 ya está disponible! (¡Y es casi el doble del tamaño del Capítulo 1!)", false],

predation's People

Contributors

xalsier avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mycodingcanvas

predation's Issues

No error handling for when src file for non existent localized file cannot be found

Suggestion: Adding a default lang to fallback to.

Console log:
[Error] Failed to load resource: the server responded with a status of 404 () (1DE0.md, line 0)
[Error] Failed to load resource: the server responded with a status of 404 () (1DEAN.md, line 0)
[Error] Unhandled Promise Rejection: Error: Failed to load content from: https://hunt.predation.jp/WC/DE/1DE0.md
(anonymous function) (chapter.js:52)
[Error] Unhandled Promise Rejection: Error: Failed to load content from: https://hunt.predation.jp/AN/DE/1DEAN.md
(anonymous function) (chapter.js:52)
[Error] Failed to load resource: the server responded with a status of 404 () (1DE0.md, line 0)
[Error] Unhandled Promise Rejection: Error: Failed to load content from: https://hunt.predation.jp/WC/DE/1DE0.md
(anonymous function) (chapter.js:52)
[Error] Failed to load resource: the server responded with a status of 404 () (1DEAN.md, line 0)
[Error] Unhandled Promise Rejection: Error: Failed to load content from: https://hunt.predation.jp/AN/DE/1DEAN.md
(anonymous function) (chapter.js:52)

Credits Issue: Not explicitly clear whether placeholder for chapter image art is a placeholder, credit for said placeholder is mis-set.

If the branch holds with loading time for longer than 30s, it's incorrectly credited as the branch was drawn by Yuuki, whereas the credit will point to the artist that did the Chapter Art.

Either the placeholder needs to be more explicit as a placeholder, through a spinning animation, or the javascript for the credits need to change to match the placeholder image credit while the new image is loading or is failing to load.

Documenting edit's using Discovery Report API

Old System

The old system relied on checking src files

import { webnovel } from '../../dat/novDat.js';
function updateSrcFilesCount() {
    const chapters = webnovel.chapters;
    let srcFilesCount = 0;
    chapters.forEach(chapter => {
        Object.keys(chapter.authorNotePath).forEach(lang => {
            srcFilesCount += chapter.authorNotePath[lang].length;
        });
        Object.keys(chapter.chapterContentPath).forEach(lang => {
            srcFilesCount += chapter.chapterContentPath[lang].length;
        });
    });
    document.getElementById('edit-count').textContent = srcFilesCount;
}

New Proposal

A discovery system for edits using a cloudflare worker.

  • Each file grabbed from hunt is reported to the worker to run a comparison.
  • If there is a difference in the comparison, it creates a new 'edit' with data like whether or not it was a deletion and other file information
  • For 'edit history' the entire list of discovery reports can be displayed
  • And for added detail, a separate json can be used to label information like who did what edit, and what it was.
  • Edit count is based on the last discovery's id.

Debugging

  • A function could be called to grab all src files to check if there was a missing discovery.

Streamline UI Management with JSON-based Sectioning

Rather than one js file to store a switch case for all site ui updates, separate modular jsons for different sections of the site represented in temp could make it easier to update the site across languages.

One json file for all headers could be referenced, one file for all nav buttons, etc. As long as the site html remains the same then the method can remain consistent. Premade html at this stage is too bulky for the present workflow, this could also reduce the dom load.

After this is set up, the actual html of the page can be copied and pasted into the prod folder depending on the lang switch.

This method currently already works for announcements, but is treated as the exception.

// Fetch and parse the JSON file
function fetchPreface() {
    return fetch('../../JSON/preface.json')
        .then(response => response.json());
}

function updateTranslations(languageCode) {
    const translations = getTranslations(languageCode);

    fetchPreface().then(preface => {
        // Replace 'preface1' entry with the one from preface.json
        if (preface[languageCode]) {
            translations['preface1'] = preface[languageCode][0];
        }

        for (const [id, translationKey] of Object.entries(translations)) {
            const element = document.getElementById(id);
            if (element) { 
                element.textContent = translationKey;
            }
        }
    });
}

Separated Comments by Lang with Filters?

A potential enhancement where the en, ja, ko etc versions of the site have separate comments, with the ability to toggle all lang comments at once to show the full scope or see other filters by language for a chapters comment section

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.