Giter Site home page Giter Site logo

rustcoreutils / posixutils-rs Goto Github PK

View Code? Open in Web Editor NEW
23.0 1.0 8.0 475 KB

Core POSIX command line utilities in safe Rust

License: MIT License

Rust 100.00%
coreutils coreutils-programs posix posix-compatible posix-compliance posix-compliant rust rust-lang

posixutils-rs's Issues

Localization (i18n): notes and planning

Introduction

Soliciting discussion over the localization (i18n) strategy for this project.

Goals

Goal 1: Localize everything

The goal is complete localization of all messages visible to the user, within the bounds of POSIX compliance:

  • All util messages, collation sequences, charsets and other util i18n details
  • All --help messages and related output (clap crate)
  • All OS error messages (io::Result)
  • It is believed that some minimum set of strings are required to be English/POSIX permanently. Minimize this POSIX-only set as much as possible.

Goal 2: Encourage UTF-8

To be forward-looking, this project looks for opportunities to

  • Drop support for non-UTF 8 strings
  • Default to UTF-8 charsets and strings

This project should aggressively interpret the POSIX standards in terms of UTF-8 support, and look for opportunities to create default-UTF-8 operating modes, with a fallback mode that is "POSIX-ly correct."

Implementation strategies

Current strategy

The current strategies are,

  • use the gettext crate, and mark strings with gettext(). This provides a starting point for per-util coding, and at least gets us started on the road to i18n.
  • each util sets the charset thusly,
    bind_textdomain_codeset(PROJECT_NAME, "UTF-8")?;

Improvements to our i18n

At present, OS error messages and --help are not translated at all, and need a project-wide strategy.

Also, one idea that is aligned with the gencat util is to generate catgets message catalogs and abandon gettext. This works because catgets exists on all modern platforms.

See issue #65 for util-related tasks.

Feedback and thoughts are requested. We want to give users the best i18n support possible.

SCCS utilities

Implement SCCS utilities:

  • admin
  • delta
  • get
  • prs
  • rmdel
  • sact
  • sccs
  • unget
  • val
  • what

Development utilities

Implement development utilities:

  • ar
  • c99
  • cflow
  • ctags
  • cxref
  • fort77
  • lex
  • make
  • nm
  • strings
  • strip
  • yacc

Cron and Batch utilities

Implement cron and batch-related utilities:

  • cron daemon. While not specified, its need is implied and worth building.
  • at
  • batch
  • crontab
  • qalter
  • qdel
  • qhold
  • qmove
  • qmsg
  • qrerun
  • qrls
  • qselect
  • qsig
  • qstat
  • qsub

Create integration tests for "rmdir" utility

The rmdir utility found in tree/src/rmdir.rs lacks integration tests.

Create a new set of integration tests in tree/tests/rmdir-tests.rs. Test both with and without -p. Ensure negative tests exist, testing failure conditions, as well as positive tests. Test with zero, one and multiple pathnames on the command line. Verify that the utility CLI exit code is POSIX compliant and correct in all cases.

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.