primordic/IssueDupesLite huggingface dataset:
Repository: contentlayerdev/contentlayer

Issue #375: Document Collection Manifest Generator generates duplicate import names for Korean file names
Created: 2023-02-09T12:44:56Z
It seems that there is a problem with the Document Collection Manifest generator. When using a file name in Korean, the generator is unable to create an appropriate import name, so it creates an import name based on the first alphabet of the extension. This causes an issue by creating a duplication of the import name.
// NOTE This file is auto-generated by Contentlayer
import test23Md from './test23.md.json' assert { type: 'json' }
import mdx from './개발자 키리 - 대한민국 최애 개발자.mdx.json' assert { type: 'json' }
import mdx from './테스트용마크다운.mdx.json' assert { type: 'json' }
import 2____mMdx from './한글2____m.mdx.json' assert { type: 'json' }

export const allPosts = [helloWorldMd, test23Md, mdx, mdx, 2____mMdx]
Screen shot
My content directory

Auto generated 'document collection manifest'

Duplicate issue #385: Chinese mdx file name conversion problem
Created: 2023-02-25T19:07:23Z
I'm usingContentlayer. My mdx file name contains chinexe
Such like  python with 函数链.mdx
after generate I got
import blog__python__pythonWithMdx from './blog__python__python with 函数链.mdx.json' assert { type: 'json' }
in _index.mjs
When I create two file named like python with 函数链.mdx and python with 函数.mdx  error comes
import blog__python__pythonWithMdx from './blog__python__python with 函数链.mdx.json' assert { type: 'json' }
import blog__python__pythonWithMdx from './blog__python__python with 函数.mdx.json' assert { type: 'json' }

I check source code find question maybe in 
  
    
      contentlayer/packages/@contentlayer/core/src/generation/generate-dotpkg.ts
    
    
         Line 322
      in
      ad462a4
    
  
  
    

        
          
           dataVariableName: getDataVariableName({ docDef }), 
        
    
  


But I am new to ts, dont konw how to do

Closing comment (2023-02-25T19:34:52Z): @majiayu000 Related to #375 and #337
Repository: contentlayerdev/contentlayer

Issue #238: `contentlayer.config.ts` should handle tsconfig paths
Created: 2022-05-31T14:46:29Z
using an absolute import defined via tsconfig.json#paths in contentlayer.config.ts currently throws a ConfigReadError
steps to reproduce:

git clone git@github.com:stefanprobst/issue-contentlayer-tsconfig-paths.git
cd issue-contentlayer-tsconfig-paths
npm i
npm run generate

Duplicate issue #230: Importing aliased module
Created: 2022-05-24T14:09:30Z
I have an issue where I can't import my module with typescript aliases in a Next.js typescript project.
// contentlayer.config.ts
import type * as H from 'hast';
import {
  makeSource,
  defineDocumentType,
  ComputedFields,
} from 'contentlayer/source-files';
import readingTime from 'reading-time';
import rehypeAutoHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import remarkGfm from 'remark-gfm';
import rehypeShiki from '@re-taro/rehype-shiki';
import { getHighlighter } from 'shiki';
import { getImgProps } from '@site/helpers'; // Here's the module
// tsconfig.json
{
  "compilerOptions": {
     // ...other of the config
    "paths": {
      "@site/*": ["./src/*"],
      "@content": ["./.contentlayer/generated"]
    }
  },
  "include": [
    "next-env.d.ts",
    "**/*.ts",
    "**/*.tsx",
    ".contentlayer/generated"
  ],
  "exclude": ["node_modules"]
}
contentlayer version: "^0.2.5"
next-contentlayer version: "^0.2.5"
When running
yarn contentlayer build
Here's what I got

Is that possible to use path aliases with typescript to solve this?
Thanks in advance!

Closing comment (2022-07-05T14:59:25Z): Thanks for opening this issue. Closing as duplicate of #238.
Repository: contentlayerdev/contentlayer

Issue #149: Support for nested field types in computed fields
Created: 2022-03-16T16:56:35Z
Right now if I have a computed field and I'd like to return a non-primitive value I have to use json as the type. Ideally I'd be able to use a nested field definition to provide stronger typing for computed fields.
Related to #91 in that this would bring computed fields in line with regular fields.

Duplicate issue #358: Using Nested Objects List in Computed Fields not allowed
Created: 2023-01-21T15:44:35Z
Looking at https://www.contentlayer.dev/docs/reference/source-files/field-types#nested-objects-list I'd like to be able to make computed fields lists strongly typed like that.
Using the example but changing fields to computedFields:
const Tag = defineNestedType(() => ({
  name: 'Tag',
  fields: {
    title: { type: 'string', required: true },
  },
}))

defineDocumentType(() => ({
  // ...
  computedFields: {
    // ...
    tags: {
      type: 'list',
      of: Tag,
    },
  },
}))
I get the following error:
 fields.tsx    79   7 error    2322   Type '{ type: "list"; of: NestedType<string>; resolve: (doc: GetDocumentTypeGen<T>) => { title: string; }[]; }' is not assignable to type 'ComputedField<T>'.
   Object literal may only specify known properties, and 'of' does not exist in type 'ComputedField<T>'. (lsp)
How should I go about strongly typing computed json/ lists?

Closing comment (2023-02-13T13:38:43Z): Thanks for opening this issue. This looks like a duplicate of #149. If you think it's a separate issue or have other questions, feel free to follow up in the comments.
Repository: contentlayerdev/contentlayer

Issue #76: Duplicate attributes for DocumentType when using computed Fields to add defaults for normal fields
Created: 2021-12-17T08:24:44Z
Hi, I'm currently using computed fields to add defaults for optional fields. This results in duplicate attributes in the generated document type classes. Is there another way of defining defaults, or should I approach this differently? If not you might consider adding a bugfix to support this scenario of using computed fields to define defaults.
const computedFields = {
  slug: {
    type: "string",
    resolve: (doc) => doc._raw.sourceFileName.replace(/\.md$/, ""),
  },
  excerpt: {
    type: "string",
    resolve: async (doc) => {
      if (doc.excerpt) {
        return doc.excerpt;
      }

      const stripped = await remark()
        .use(strip)
        .process(doc.body.raw.replace(/(<([^>]+)>)/gi, ""));

      const excerpt = stripped.toString().slice(0, 500).trim();

      return `${excerpt}…`;
    },
  },
};

export const Post = defineDocumentType(() => ({
  name: "Post",
  filePathPattern: `posts/*.md`,
  fields: {
    title: { type: "string", required: true },
    publishedAt: { type: "date", required: true },
    excerpt: { type: "string", required: false },
  },
  computedFields,
}));
This results in the following:
export type Post = {
  /** File path relative to `contentDirPath` */
  _id: string
  _raw: Local.RawDocumentData
  type: 'Post'
  title: string
  publishedAt: string
  excerpt: string | undefined
  /** Markdown file body */
  body: Markdown
  slug: string
  excerpt: string
}  
Despite it works you do see excerpt is twice in the Post type. Once as string and once as string | undefined. The generated JSON itself has the field only once as I would expect.
I should probably mention in my project I'm using this from Javascript. That is probably why all still works. In TypeScript this might give some more issues.

Duplicate issue #91: Combine `fields` and `computedFields`
Created: 2022-01-05T17:01:15Z
Today we have fields and computedFields. The definitions in computedFields expects a function to which Contentlayer passes the processed document.
I'd rather be able to define all my fields in one place and allow the options of that field definition (presence of resolve) to determine whether or not it should be computed. Thus, I could have a doc type def like this:
const Page = defineDocumentType(() => ({
  // ...
  fields: {
    title: { type: 'string', required: true },
    url_path: {
      type: 'string',
      resolve: (doc) => doc._raw.flattenedPath.replace(/pages\/?/, ''),
    },
  },
}))
To do this and still support current use cases, it'd be beneficial to not just pass the processed doc object, but also input data. (See #76 for an example use case.) IOW the shape of the doc passed to the resolve function might include the following properties:

_raw would still be there as it is today
frontmatter would contain the raw frontmatter content
body (configurable) would contain the processed body

Closing comment (2022-01-05T19:27:11Z): Related to #76
Repository: conventional-changelog/commitlint

Issue #589: no such file or directory COMMIT_EDITMSG on new checkout
Created: 2019-03-03T22:00:26Z
When checking out a repo, there is no COMMIT_EDITMSG file until a new commit is made. In the case of elastic-apm-node, we trigger the commit lint automatically, as part of the test process. This currently means a fresh checkout can't run the tests because @commitling/cli will crash due to being unable to find that file.
Expected Behavior
There was no commit to have a failing message on, so it should not be a failure.
Current Behavior
It crashes with this output:
/home/stephenbelanger/Code/elastic-apm-node/node_modules/@commitlint/cli/lib/cli.js:113
	throw err;
	^

Error: ENOENT: no such file or directory, open '/home/stephenbelanger/Code/elastic-apm-node/.git/COMMIT_EDITMSG'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elastic-apm-node@2.5.1 lint-commit: `test/lint-commits.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the elastic-apm-node@2.5.1 lint-commit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/stephenbelanger/.npm/_logs/2019-03-03T19_30_57_446Z-debug.log

Affected packages

 cli
 core
 prompt
 config-angular

Possible Solution
Consider it a "pass" if the file is not found.
Steps to Reproduce (for bugs)

Checkout any repo for the first time, which uses @commitlint/cli
Trigger @commitlint/cli
???
😢

Context
Currently this makes the contributing process painful, as new contributors will always run into this the first time they try to run our tests.

Duplicate issue #2894: no such file or directory COMMIT_EDITMSG at every new repo without a local commit
Created: 2021-12-01T07:06:01Z
At every newly cloned repo without a local commit, the pre-commit hook with commitlint --edit fails ( COMMIT_EDITMSG doesnt exist )
$ /Users/gkatsanos/repos/visable-vue/node_modules/.bin/commitlint --edit
/Users/gkatsanos/repos/visable-vue/node_modules/@commitlint/cli/lib/cli.js:112
throw err;
^
[Error: ENOENT: no such file or directory, open '/Users/gkatsanos/repos/visable-vue/.git/COMMIT_EDITMSG'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/gkatsanos/repos/visable-vue/.git/COMMIT_EDITMSG'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-commit hook exited with code 1 (error)
git exited with error code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Closing comment (2021-12-01T07:08:51Z): Possible duplicate of #589
Repository: conventional-changelog/commitlint

Issue #1791: @commitlint weights 32MB in node_modules
Created: 2020-05-26T14:58:41Z
I installed commitlint and checked weight
 du -sh node_modules/@commitlint/
 32M	node_modules/@commitlint/

It happens because commitlint uses lodash in packages and they are not reused.
List of packages I have in @commitlint directory:
cli
ensure
execute-rule
format
is-ignored
lint
load
message
parse
read
resolve-extends
rules
to-lines
top-level
types

Expected Behavior
Weight is lower than 10MB, the lower the better

Duplicate issue #3040: Reduce the package install size?
Created: 2022-02-22T15:32:28Z
The package install size 71 MB. Reducing the size will help install speed and save some bandwidth.
Seems that version 13.2.0 increased the package size significantly:

Closing comment (2022-02-23T05:33:52Z): Hey thanks, this duplicates #1791.
Happy to reopen #1791 it if someone wants to create a PR for this. Otherwise it will stay closed because we won't have the time.
Repository: conventional-changelog/commitlint

Issue #2393: @commitlint/utils@11.0.0 is not published
Created: 2021-01-06T15:07:11Z
The @commitlint/*/package.json files appear to all have a devDependency for @commitlint/utils: ^11.0.0, however the latest published version of that repo is 9.0.1.   Is this intentional?
Noticed this at https://npm.broofa.com/?q=@commitlint/top-level@11.0.0 (Enable "devDependencies" toggle)
$ npm info @commitlint/utils

@commitlint/utils@9.0.1 | MIT | deps: 7 | versions: 29
...

dist-tags:
latest: 9.0.1  next: 9.1.0

published 7 months ago by escapedcat <npm@htmlcss.de>

Duplicate issue #2603: No matching version found for @commitlint/test@^11.0.0
Created: 2021-05-17T13:53:42Z
No matching version found for @commitlint/test@^11.0.0. Npm version might be error.


Expected Behavior
install success


Current Behavior


Affected packages

 cli
 core
 prompt
 config-angular

Possible Solution


Steps to Reproduce (for bugs)
install "@commitlint/cli": "^11.0.0" as devDeps

Closing comment (2021-05-17T13:57:05Z): Duplicates #2393
Repository: conventional-changelog/commitlint

Issue #4209: fix: Find Up dependancy
Created: 2024-12-13T17:00:51Z
Steps to Reproduce
1. First step
When using commitlint, I have used a conventional commit
2. Second step
Unable to commit due to the current behaviour
Current Behavior
Seeing the below error message
import { findUp } from ‘find-up’;
^^^^^^
SyntaxError: Named export ‘findUp’ not found. The requested module ‘find-up’ is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from ‘find-up’;
const { findUp } = pkg;
Expected Behavior
I should be able to commit correctly
Affected packages

 cli
 core
 prompt
 config-angular

Possible Solution
I have added Find Up as a dependancy
"dependencies": {
"find-up": "^7.0.0"
}
Context
I would like to be able to remove this dependancy as it's a direct dependancy of the Commit Lint package, not required by my application
commitlint --version
@commitlint/cli": "^19.5.0"
git --version
git version 2.47.1
node --version
v20.9.0

Duplicate issue #4208: fix: <title>
Created: 2024-12-13T17:00:50Z
Steps to Reproduce
1. First step
When using commitlint, I have used a conventional commit
2. Second step
Unable to commit due to the current behaviour
Current Behavior
Seeing the below error message
import { findUp } from ‘find-up’;
^^^^^^
SyntaxError: Named export ‘findUp’ not found. The requested module ‘find-up’ is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from ‘find-up’;
const { findUp } = pkg;
Expected Behavior
I should be able to commit correctly
Affected packages

 cli
 core
 prompt
 config-angular

Possible Solution
I have added Find Up as a dependancy
"dependencies": {
"find-up": "^7.0.0"
}
Context
I would like to be able to remove this dependancy as it's a direct dependancy of the Commit Lint package, not required by my application
commitlint --version
@commitlint/cli": "^19.5.0"
git --version
git version 2.47.1
node --version
v20.9.0

Closing comment (2024-12-15T15:31:10Z): Duplicates #4209
Repository: conventional-changelog/commitlint

Issue #607: How to use parser headerPattern
Created: 2019-04-02T00:55:24Z
The task is to use commitlint to prevent commits from being commited. I use husky as well
when I test it and run
 echo "bla bla bla"  | npx commitlint
It doesn't catch anything and shows no errors found
⧗   input: bla bla bla 
✔   found 0 problems, 0 warnings 

Please, help, why it ignores parserOpts.headerPattern ?
Also some other notice:
I need at least one rule, otherwise commitlint doesn't want to run
Do I need to add headerCorrespondence to make it work or I can have headerPattern only?
Can I customize report message in case if I headerPattern is not matched?
commitlint.config.js
module.exports = {
  rules: {
    'header-min-length': [2, 'always', 20],
  },
  parserPreset: {
    parserOpts: {
      headerPattern: /^(feat|fix|perf|test|BREAKING CHANGE):.*\[REF-(\d{3,}|N\\A)\] \S+ \S+ \S+ \S+ \S+/,
      headerCorrespondence: ['type', 'scope', 'subject']
    }
  }
};
husky in package.json
  "husky": {
    "hooks": {
      "pre-push": "npm test",
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
I installed the next
    "@commitlint/cli": "^7.5.2",
    "@commitlint/parse": "^7.5.0",

Duplicate issue #903: headerPattern - custom regex dont accepting "OR" condition
Created: 2020-01-24T14:50:29Z
I've set parserOpts as in the documentation:
module.exports = {
    parserOpts: {
        headerPattern: /^\[(\w*)\] - #(\d|[S\/N]+) - (.*)$/,
        headerCorrespondence: ['type', 'references', 'subject']
    }
};

this regex accept:
[NOVO] - #2 - tESTE
and
[NOVO] - #S/N - tESTE
as you can see here  https://regex101.com/r/ugvxwX/1
Expected Behavior
Accepting in references a number or the string S/N
Current Behavior
git commit -m "[BUG] - #S/N - correcting modal name and mispelling grammar"
husky > commit-msg (node v11.9.0)
⧗   input: [BUG] - #S/N - correcting modal name and mispelling grammar
✖   subject must be sentence-case [subject-case]
✖   references may not be empty [references-empty]

✖   found 2 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

husky > commit-msg hook failed (add --no-verify to bypass)


Your Environment




Executable
Version




commitlint --version
8.3.4


git --version
2.24.2


node --version
11.9.0


Windows
10

Closing comment (2021-02-04T10:59:53Z): Looks like the same as #607
Repository: conventional-changelog/commitlint

Issue #607: How to use parser headerPattern
Created: 2019-04-02T00:55:24Z
The task is to use commitlint to prevent commits from being commited. I use husky as well
when I test it and run
 echo "bla bla bla"  | npx commitlint
It doesn't catch anything and shows no errors found
⧗   input: bla bla bla 
✔   found 0 problems, 0 warnings 

Please, help, why it ignores parserOpts.headerPattern ?
Also some other notice:
I need at least one rule, otherwise commitlint doesn't want to run
Do I need to add headerCorrespondence to make it work or I can have headerPattern only?
Can I customize report message in case if I headerPattern is not matched?
commitlint.config.js
module.exports = {
  rules: {
    'header-min-length': [2, 'always', 20],
  },
  parserPreset: {
    parserOpts: {
      headerPattern: /^(feat|fix|perf|test|BREAKING CHANGE):.*\[REF-(\d{3,}|N\\A)\] \S+ \S+ \S+ \S+ \S+/,
      headerCorrespondence: ['type', 'scope', 'subject']
    }
  }
};
husky in package.json
  "husky": {
    "hooks": {
      "pre-push": "npm test",
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
I installed the next
    "@commitlint/cli": "^7.5.2",
    "@commitlint/parse": "^7.5.0",

Duplicate issue #895: Using custom regex on headerPattern ins't creating a valid message
Created: 2020-01-07T14:21:22Z
Hi,
I'm trying to make a custom commit message that starts with the ID of the issue on ours system.
This is a exemple of the message #123 fix: fix issue.
Here is my files
//package.json
  "devDependencies": {
    "@commitlint/cli": "^8.3.4",
    "husky": "^4.0.0"
  }
//commitlint.config.js
module.exports = {
  parserPreset: "./parser-preset.js",
  rules: {
    "type-empty": [2, "never"],
    "subject-empty": [2, "never"]
  }
};
//parser-preset.js
module.exports = {
  parserOpts: {
    headerPattern: /^#(\d*)\s(\w*):\s(.*)$/,
    headerCorrespondence: ["id", "type", "subject"]
  }
};
//.ruskyrc.js
module.exports = {
  hooks: {
    "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
  }
};
By the parser-preset, a commit message with #123 fix: fix issue, should be a valid message, and should send the type and subject correctly for the commitlint. But I'm getting this error:
✖   type may not be empty [type-empty]
✖   subject may not be empty [subject-empty]

✖   found 2 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
What I'm missing? What I did wrong?

Closing comment (2021-02-04T10:59:10Z): Looks like the same as #607
Repository: conventional-changelog/commitlint

Issue #3120: bug: footer-leading-blank always triggers when comment in body
Created: 2022-04-13T11:35:28Z
footer-leading-blank complains when comment in body
Example Commit Message
fix: failing example

body line 1
# comment in body breaks footer-leading-blank - uncomment to remove the error
body line 2

fixes #123

Try it out
This bug seems to differ from #896
Expected Behavior
The rule should locate the body lines properly and not think there is content between body and footer.
Current Behavior
The footer-leading-blank rule counts the body lines excluding the comments and then compares them to the raw input, which in turn contains the comments.
Affected packages

 @commitlint/rules and all packages using it

Possible Solutions
Bug is in footer-leading-blank.ts

Correctly count the raw length of bodyLines in or
Remove comment lines from rawLines before slicing

Steps to Reproduce (for bugs)
See message or link at the top of the issue
Your Environment



Executable
Version




commitlint --version
16.2.3


git --version
2.35.1


node --version
16.14.2

Duplicate issue #3129: input is not displayed correctly (non-existing blank lines added)
Created: 2022-04-20T08:36:08Z
Current Behavior
When there's no blank line between body and footer (and the line is recognised as footer due to existing issue reference), commitlint wrongly displays the input and adds that blank line between them, which makes the lint messages pretty confusing (please look at the example below).
Expected Behavior
Displayed input should be exactly the same as provided input.
Affected packages

 cli
 core
 prompt
 config-angular

Possible Solution
Display the initial input with no modification at all.
Steps to Reproduce (for bugs)
❯ echo "test(general): test

some body
related to #1

Issues: #2" | npx commitlint
⧗   input: test(general): test

some body

related to #1

Issues: #2
✖   footer must have leading blank line [footer-leading-blank]
(looking at what is displayed - the blank line is there, but it's actually missing)
Context


Your Environment




Executable
Version




commitlint --version
@commitlint/cli@16.2.3


git --version
git version 2.32.0 (Apple Git-132)


node --version
v17.9.0

Closing comment (2022-04-20T10:07:33Z): Have a look if this related to #3120 or #896
Repository: conventional-changelog/commitlint

Issue #586: Document use of commitlint as a github action (possible own CLI in the future)
Created: 2019-02-21T14:25:58Z
Expected Behavior


Provide a github actions cli just like commitlint-travis.
Context


It should easy setup for running commitlint as part of a github actions setup.

Duplicate issue #2568: How to run commitlint in GitHub workflow on every commit of a push
Created: 2021-04-29T05:53:12Z
I created  a new Github repository and followed https://commitlint.js.org/#/guides-local-setup. After that I created this workflow
name: Run commitlint on pull request
'on': pull_request
jobs:
  run-commitlint-on-pull-request:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: 14.x
      - name: Install dependencies
        run: npm install
      - name: Validate all commits from PR
        run: >
          for commit in $(git rev-list ${{ github.base_ref }}..${{
          github.head_ref }}); do
              npx commitlint --from $commit --to HEAD --verbose
          done
to validate each commit message in a PR. I created a new branch and made a change 3 times with the following commit messages:

invalid one
feat: valid two
invalid three

Expected Behavior
I would expect that commit message 1 and 3 are invalid so the workflow rejects the pull request.
Current Behavior
Unfortunately the validation passes.

I also tried this
run: npx commitlint --from  ${{ github.base_ref }} --to ${{ github.head_ref }} --verbose
This time the workflow didn't pass but the output result is wrong

Affected packages

 cli
 core
 prompt
 config-angular

Possible Solution
As shown in the image I think my syntax is wrong and needs to get fixed.
Steps to Reproduce (for bugs)

Create a new Github repository
Clone it
Setup npm
Setup commitlint with husky as shown in the docs
Create a Github workflow (take my code from above)
Push everything
Create a new branch
Make some changes with valid and invalid commit messages
Create a PR
The PR should get rejected by the workflow but it passes

Context
I would like to validate each commit message from commits in a PR
Your Environment



Executable
Version




commitlint/cli --version
12.1.1


commitlint/config-conventional --version
12.1.1


git --version
2.25.1


node --version
14

Closing comment (2021-04-29T06:23:40Z): Is this related to #586?
Repository: crow-translate/crow-translate

Issue #53: macOS support
Created: 2019-09-08T17:09:38Z

Duplicate issue #575: Support mac os
Created: 2023-07-03T01:36:45Z
Describe the problem or limitation you are having

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Closing comment (2023-07-03T06:57:23Z): Duplicate of #53.
Repository: crow-translate/crow-translate

Issue #548: Support double Ctrl/Alt/Shift keys for translation
Created: 2023-05-27T13:48:39Z
Currently, when performing text translation using your software, I have noticed that the Double Ctrl and Double Alt keys are not supported as keyboard shortcuts. As a regular user of your product, I believe that enabling these key combinations will improve the user expirience of your application.
By allowing users to utilize the Double Ctrl and Double Alt keys, they would be able to effortlessly trigger translation functions while seamlessly navigating through their texts.
I kindly request your team to consider implementing this enhancement in an upcoming software update. I believe that integrating support for Double Ctrl and Double Alt keys would be a valuable addition to your software, further solidifying its position as a leading choice for text translation.

Duplicate issue #687: double shift
Created: 2024-05-26T12:32:24Z
pls, add ability to use 'double shift' press (like in QTranslate) instead of Ctrl+Alt+E

Closing comment (2024-05-26T12:46:31Z): Duplicate of #548.
Repository: crow-translate/crow-translate

Issue #99: Support hotkey for translation of a text from clipboard
Created: 2020-01-17T22:38:24Z
Is your feature request related to a problem? Please describe
I read pdfs in Okular, Crow doesn't recognize selections there.
Describe the solution you'd like
4 more global shortcuts, each of which takes the text from clipboard, not from selection

Duplicate issue #637: Translate text from clipboard!
Created: 2023-12-03T17:08:05Z
I've been utilizing the 'translate selected text' functionality for quite a long time, and it has been serving me well for the past couple of years. However, now I'm having to use virtual machines quite a lot, and as you can imagine, I cannot share the selected text between them. What I can do, though, is share the clipboard. So, if I need to translate something automatically, I would set a hotkey, like Control + C + C. When I press Control + C, it would copy the text to the clipboard, and when I press it a second time, it would automatically translate.
It also allows for translating selected text in certain software, including ported software that doesn't play well with selected text, like Onlyoffice; the 'translate selected text' feature doesn't work there.

Closing comment (2023-12-03T18:10:23Z): Duplicate of #99.
Repository: crow-translate/crow-translate

Issue #62: Configurable font size
Created: 2019-10-17T13:24:33Z
thanks for this program
i have ideas
please added button on settings for change size font's
thanks

Duplicate issue #98: Request: font size
Created: 2020-01-15T14:26:29Z
when I press a shortcut to translate selected text, the translation window shows up, but the text in it is way too small, could we please get the feature to adjust font size? Thank you!

Closing comment (2020-01-15T14:32:48Z): Duplicate of #62
Repository: crow-translate/crow-translate

Issue #397: Hotkeys for clear input screen, switch between input-output languages, and switch translation engine
Created: 2022-02-21T20:01:46Z
Describe the problem or limitation you are having
when I use the translator, every time I reopen it to make a new translation I have to select the text with the mouse and delete it
(I know that I could use crtl+A and then press the delete key) but there are already two steps to be done, whether I use the mouse or not. It's all about improving ergonomics and productivity
Describe the solution you'd like
Being able to define hotkeys for clear the input screen, switch between input languages, switch between output languages and switch between translation engines (with the same hotkey go switching circularly, for example)
Describe alternatives you've considered
I can't think of any alternative other than doing these actions using the mouse
Additional context
The continued use of the mouse, apart from being slow and sometimes inefficient and unproductive, can eventually cause damage to hands, wrists and forearms.

Duplicate issue #683: Ability to set a shortcut for clearing the source
Created: 2024-05-19T16:00:27Z
Describe the problem or limitation you are having

When keep translating things, I have clear the existing source text. I can do that by clicking the (X) button or by pressing ctrl+a -> del. But one shortcut would be more convenient.
Describe the solution you'd like

In settings -> Shortcuts, add "Clear text".
Describe alternatives you've considered

Additional context

Closing comment (2024-05-20T08:04:34Z): Duplicate of #397.
Repository: crow-translate/crow-translate

Issue #105: "Error transferring" message
Created: 2020-02-19T10:20:13Z
Bug description
I get this error after some time of entering of the text.
Steps to reproduce
Steps to reproduce the behavior:

Check the box "Automatically translate".
Select Google translate service.
Enter text for some time in the original text box.
See error.

Expected behavior
I expect to see a translation of the entered text.
Screenshots

Environment

OS: Windows 8.1
Crow Translate version: (e.g. 2.3.1)

Duplicate issue #374: server replied: Too Many Requests
Created: 2021-10-16T17:00:59Z
After some attempts, crow stop working!
Bug description
$ crow -t fr "test"

"Error: Error transferring https://translate.googleapis.com/translate_a/single?client=gtx&ie=UTF-8&oe=UTF-8&dt=bd&dt=ex&dt=ld&dt=md&dt=rw&dt=rm&dt=ss&dt=t&dt=at&dt=qc&sl=auto&tl=fr&hl=en&q=test - server replied: Too Many Requests"
test

[ Automatically detect -> French ]
Environment

OS: Arch Linux
Desktop environment: dwm
Crow Translate version: (e.g. 2.8.7)

Additional context
I think google traduction does not permit cli tool to translate with terminal
I tested with proxy like that
$ export https_proxy=http://...:8080
# then
$ crow -t fr "test"
but not work

Closing comment (2021-10-16T17:02:25Z): Duplicate of #105.
Repository: crow-translate/crow-translate

Issue #68: Functional suggestion: replace the selected text with the translation. 
Created: 2019-10-20T21:42:40Z
QTranslate has this very practical feature. I would like you to add it to your application.

We select the text
With keyboard shortcuts, the window is displayed with the translation.
I would like to add a button to close this window and replace the selected text with the translation.

Duplicate issue #585: Recommend feature
Created: 2023-07-12T14:00:30Z
Hello, can you add a "change selected text" feature, for example I write text and characters in notpad, I highlight them and use a certain keyboard shortcut, the characters I highlight will automatically is it possible to switch to secondary language!!?
Thanks for reading!

Closing comment (2023-07-12T14:01:48Z): Duplicate of #68.
Repository: crow-translate/crow-translate

Issue #556: settings.ini in portable mode should be taken relative to the executable path
Created: 2023-06-05T16:26:59Z
Describe the problem or limitation you are having
I added crow.exe to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths so that I can run crow.exe from the run dialog. But it did not pick the settings.ini file because it is specified as relative path (i.e. to the current working directory) rather than to the application directory.
Describe the solution you'd like
Join settings.ini with QCoreApplication::applicationDirPath().
Describe alternatives you've considered
N/A
Additional context
OS: Windows 10

Duplicate issue #583: Settings.ini file no longer working in portable mode
Created: 2023-07-11T12:51:25Z
Bug description
Settings.ini file no longer created/used in portable mode since version 2.10.6
Steps to reproduce

Go to 'Settings'
Click on 'Portable mode'
Change any other setting
Click on 'Ok'
settings.ini file is not created

Expected behavior
settings.ini file created.
Environment

OS: Windows 10 Pro 22H2  (Build 19045.3086)
Crow Translate version: 2.10.6

Additional context
I tried putting my old settings.ini file in Crow Translate's folder but it didn't work this way either.

Closing comment (2023-07-11T12:52:31Z): Duplicate of #556.
Repository: crow-translate/crow-translate

Issue #68: Functional suggestion: replace the selected text with the translation. 
Created: 2019-10-20T21:42:40Z
QTranslate has this very practical feature. I would like you to add it to your application.

We select the text
With keyboard shortcuts, the window is displayed with the translation.
I would like to add a button to close this window and replace the selected text with the translation.

Duplicate issue #580: Shortcut to directly replace selected text by the translation (in any application) without calling the main window
Created: 2023-07-05T21:37:44Z
When I want to directly replace highlighted text by its translation, I have to use the function "Translate selected text and copy it to the clipboard" (or press the shortcut I select for this) and then press Ctrl + V.
Why not introduce a function where I just have to press one shortcut?

Closing comment (2023-07-05T22:13:21Z): Duplicate of #68.
Repository: crow-translate/crow-translate

Issue #330: The icons in Crow Translate lost even I have tried to configure the qt5ct
Created: 2021-07-15T14:50:12Z
Bug description
The icons in Crow Translate lost even I have tried to configure the qt5ct. I don't know how to solve this problem.
Steps to reproduce

Install Crow Translate by dpkg
Install libqt5svg5, qt5ct by apt-get
add export QT_QPA_PLATFORMTHEME=qt5ct to ~/.profile
restart and run with QT_QPA_PLATFORMTHEME=qt5ct crow

Screenshots




Test

If I set Appearence-style to gtk2 or run with QT_QPA_PLATFORMTHEME=gtk2 crow, "pk-gtk-module" error will occur. Some of the icons in the main interface lost, but the icons in Settings work well.



If I use other styles, all icons almost lost.




Environment

OS: Ubuntu 20.04.2 LTS
Desktop environment: GNOME 3.36.8
Crow Translate version: 2.8.4

Additional context
I have read #198 and googled a lot, but I still can't deal with trouble about QT. I need help.

Duplicate issue #393: Button icons not showing
Created: 2022-02-01T07:47:07Z
When opening the program in Manjaro Xfce, the icons on the buttons are not displayed. When opened in the terminal, it gives an error:
QHotkey: "Не удалось зарегистрировать Ctrl+Alt+F. Ошибка: BadAccess (attempt to access private resource denied)" qt.xkb.compose: failed to create compose table

Closing comment (2022-02-01T08:09:39Z): Duplicate of #330.
Repository: css/csso

Issue #143: Background rewrites background-position
Created: 2013-09-25T21:37:55Z
In:
.test1 {
  background: url(/1.png) no-repeat;
  background-size: 85px 85px;
}
.test2 {
  background: url(/2.png) no-repeat;
  background-size: 85px 85px;
}
Out:
.test1{background:url(/1.png)}
.test1,.test2{background-size:85px 85px}
.test2{background:url(/2.png)}
So in out third line background for .test2 rewrites background-size, which was combined for .test1 and .test2.

Duplicate issue #115: Небезопасная структурная минимизация для сочетания "фоновых" свойств в полной и короткой записи
Created: 2012-12-03T08:57:38Z
В чем-то перекликается с #58, но смысл другой немного.
Структурная минимизация ломает правильную последовательность свойств при сочетании конкретных правил для фона и укороченной записи.
Реальный случай кнопки на цсс3 с полным фолбеком для ИЕ на картинках.
"Лишние" свойства удалены:
.b-billet_viewtype_a1-right-arrow {
  background-image: url('../images/bg/billets_original.png');
  background-position: 0 -100px;
  background: linear-gradient(to bottom, transparent 0%, transparent 100%);
}
.b-billet_viewtype_a1-right-arrow .b-billet__in {
  background-image: url('../images/bg/billets_original.png');
  background-position: 100% -125px;
  background: linear-gradient(to bottom, #fbfbfb 0%, #e4e6e8 100%);
}
На выходе:
.b-billet_viewtype_a1-right-arrow {
    background-position: 0 -100px;
    background: linear-gradient(to bottom, transparent 0, transparent 100%);
}

.b-billet_viewtype_a1-right-arrow, .b-billet_viewtype_a1-right-arrow .b-billet__in {
    background-image: url('../images/bg/billets_original.png');
}

.b-billet_viewtype_a1-right-arrow .b-billet__in {
    background-position: 100% -125px;
    background: linear-gradient(to bottom, #fbfbfb 0, #e4e6e8 100%);
}
Т.е. современные браузеры получают лишнее правило (и лишний запрос к серверу):
.b-billet_viewtype_a1-right-arrow {
    background-image: url('../images/bg/billets_original.png');
}

Closing comment (2015-10-07T21:32:01Z): Initial comment looks the same as #143
Repository: css/csso

Issue #141: Remove quotes from inside url() when possible
Created: 2013-09-10T04:57:41Z
Example:
body {
    background-image: url("../images/awesomeness.png");
    ...
}
currently outputs to:
body{background-image:url("../images/awesomeness.png");...}
but should output to:
body{background-image:url(../images/awesomeness.png);...}

Duplicate issue #180: Quotes minimization
Created: 2014-01-29T15:43:53Z
Quotes in URLs and URIs can be removed because according to CSS Specification they are optional.

@import url("test.gif");
E { p: url("test.gif") }


Can be minimized to
@import url(test.gif);E{p:url(test.gif)}

Closing comment (2014-03-05T11:53:15Z): Duplicate of #141, but I agree 👍
Repository: css/csso

Issue #143: Background rewrites background-position
Created: 2013-09-25T21:37:55Z
In:
.test1 {
  background: url(/1.png) no-repeat;
  background-size: 85px 85px;
}
.test2 {
  background: url(/2.png) no-repeat;
  background-size: 85px 85px;
}
Out:
.test1{background:url(/1.png)}
.test1,.test2{background-size:85px 85px}
.test2{background:url(/2.png)}
So in out third line background for .test2 rewrites background-size, which was combined for .test1 and .test2.

Duplicate issue #213: Structural optimization bug: wrong place for merged blocks
Created: 2014-10-20T13:59:08Z
File test.css:
.footer__teaser-image_type_i-phone
{
background: url(a.png);
background-image: url(../../../sprites/c.png);
background-repeat: no-repeat;
background-position: -102px -74px;
}
.footer__teaser-image_type_logo
{
background: url(b.png);
background-image: url(../../../sprites/c.png);
background-repeat: no-repeat;
background-position: -2px -146px;
}
Run csso: csso test.css _test.css
File _test.css:
.footer__teaser-image_type_i-phone{background:url(a.png);background-position:-102px -74px}
_.footer__teaser-image_type_i-phone,.footer__teaser-image_type_logo{background-image:url(../../../sprites/c.png);background-repeat:no-repeat}_
.footer__teaser-image_type_logo{background:url(b.png);background-position:-2px -146px}
I expect that common styles rule will be inserted after original ones but not between.

Closing comment (2015-10-07T21:06:35Z): Duplicates #143
Repository: css/csso

Issue #464: [bug] minifies removes @media tags
Created: 2023-01-13T23:59:11Z
Version 5.0.5. Code to reproduce
const { minify } from require("csso");
const style = `
body {
  color: red;
}
@media (width < 720px) {
  body {
    color: blue;
  }
}`;
console.log(minify(style));
// prints { css: 'body{color:red}', map: null }
Screenshot:

Duplicate issue #476: Silently removes @media blocks containing "and (not ...)"
Created: 2024-02-18T22:47:17Z
Media rules like @media (max-width: 701px) and (not (any-pointer: fine)) will result in the whole block being dropped. What's worse, it is completely silent, doesn't even issue a warning.

Closing comment (2024-05-09T19:33:10Z): I think I've found a workaround. Removing the enclosing brackets seems to resolve the issue. Here's an example:
Before:
@media ((min-width: 45rem) and (min-aspect-ratio: 3/4)) { ... }
After:
@media (min-width: 45rem) and (min-aspect-ratio: 3/4) { ... }
This is also related to: #464
Repository: css/csso

Issue #97: Possibility to compress dirs / masks / etc
Created: 2012-10-23T12:19:25Z
Possibility to compress dirs / masks / etc.

Duplicate issue #190: compress an entire directory through command line
Created: 2014-02-28T09:30:19Z
Is it not possible to compress an entire directory in one go using command line?
With stylus I'd do:
sudo stylus styl -c -o ../css

I don't see the option to do something similar here.

Closing comment (2016-01-17T23:31:39Z): Duplicates #97
Repository: css/csso

Issue #143: Background rewrites background-position
Created: 2013-09-25T21:37:55Z
In:
.test1 {
  background: url(/1.png) no-repeat;
  background-size: 85px 85px;
}
.test2 {
  background: url(/2.png) no-repeat;
  background-size: 85px 85px;
}
Out:
.test1{background:url(/1.png)}
.test1,.test2{background-size:85px 85px}
.test2{background:url(/2.png)}
So in out third line background for .test2 rewrites background-size, which was combined for .test1 and .test2.

Duplicate issue #341: merge sequence about "background"
Created: 2017-06-08T03:42:50Z
csso version: 3.1.1
I have this css file:
div > a {
    background      : url("about:blank");
    background-size : 100%;
}

.demo > a {
    background-size : 100%;
}
this will generate:
div > a {
    background : url(about:blank)
}

.demo > a, div > a {
    background-size : 100%
}
looks good, but when i swap these tow declarations position,
.demo > a {
    background-size : 100%;
}

div > a {
    background      : url("about:blank");
    background-size : 100%;
}
i got this:
.demo > a, div > a {
    background-size : 100%
}

div > a {
    background : url(about:blank)
}
div > a's background-position would be reseted to its initial value. I know background is a sooooo complicated property, but is this a bug? I have this habit that set background and background-size at the same time, the reason was for compatible with old IE.

Closing comment (2017-06-08T08:25:44Z): Yep, it's a bug. Duplicates #143
Repository: css/csso

Issue #60: Remove "" from URLs and 0 from 0.x
Created: 2012-03-17T20:48:58Z
I can’t read all the Russian stuff, so I don’t know if this was already suggested.
Following suggestions:
background:url("xxx.jpg") > background:url(xxx.jpg)
margin:0.1px 0.2px 0.3px 0.4px > margin:.1px .2px .3px .4px
Regards
Richard

Duplicate issue #141: Remove quotes from inside url() when possible
Created: 2013-09-10T04:57:41Z
Example:
body {
    background-image: url("../images/awesomeness.png");
    ...
}
currently outputs to:
body{background-image:url("../images/awesomeness.png");...}
but should output to:
body{background-image:url(../images/awesomeness.png);...}

Closing comment (2016-01-17T23:38:52Z): Duplicates #60
Repository: css/csso

Issue #97: Possibility to compress dirs / masks / etc
Created: 2012-10-23T12:19:25Z
Possibility to compress dirs / masks / etc.

Duplicate issue #56: Хочется, чтобы CSSO мог сжимать все файлы в директории
Created: 2012-02-20T22:32:43Z
Для начала хочется какой-то ключ, который бы позволил перезаписывать файл результатом оптимизации.
А потом можно было бы сделать ключ, который бы позволил записать результат в «префикс + исходное имя файла». Ну и чтобы префикс мог быть и путём относительно текущего положения.
Тогда после всего этого можно было бы дать возможность сжимать всю папку (скажем, по умолчанию рекурсивно, а с ключём -R — не рекурсивно), используя такую команду: csso . --rewrite или csso . --prefix _, первая команда брала бы все файлы в директории и всех их сжимала, вторая — делала то же самое, но каждому файлу добавляла бы префикс: style.css превращался бы в _style.css.
Конечно, подобные вещи наверняка можно сделать и через что-то с грепом и xargs, но это не юзер-френдли :) И многие привыкли использовать «точку».

Closing comment (2016-01-17T23:40:16Z): Duplicates #97
Repository: css/csso

Issue #425: Add support for CSS variable replacement
Created: 2020-11-24T22:06:30Z
Before conversion
root: {
  --red: #ff0000;
}
.myclass { color: var(--red); }
After conversion
.myclass { color: #ff0000; }
I have a very large file with all the variables inside it for theme management; it would be nice to remove all those long names and just replace them with the colors. It would save a huge amount of space.

Duplicate issue #422: Doesn't optimize custom properties
Created: 2020-10-04T19:26:42Z
require('csso').minify(text).css
where text equals
:root {
    --color-controls-type-action-typo-base: rgba(0, 0, 0, 0.1);
    --color-controls-type-action-fill-color-base: rgb(235, 225, 224);
}
returns
:root{--color-controls-type-action-typo-base: rgba(0, 0, 0, 0.1);--color-controls-type-action-fill-color-base: rgb(235, 225, 224)}
but expected
:root{--color-controls-type-action-typo-base:rgba(0,0,0,.1);--color-controls-type-action-fill-color-base:#ebe1e0}

Closing comment (2020-11-26T13:49:46Z): Duplicate of #425
Merge in #425 since it better express what to do.
Repository: cucumber/common

Issue #168: Gherkin C tests fail on Wine
Created: 2017-03-22T13:02:01Z
Summary
Approval tests (diffing golden masters) fail with gherkin.exe running on Wine
Expected Behavior
I'd expect it to work just as on other Linuxes and OS X.
Current Behavior
Tokens with non-ASCII (Unicode) characters are printed as ?, causing the diff to fail:
wine bin/gherkin_generate_tokens.exe testdata/good/escaped_pipes.feature > acceptance/testdata/good/escaped_pipes.feature.tokens
diff --strip-trailing-cr --unified testdata/good/escaped_pipes.feature.tokens acceptance/testdata/good/escaped_pipes.feature.tokens
--- testdata/good/escaped_pipes.feature.tokens	2017-03-21 20:38:38.000000000 +0000
+++ acceptance/testdata/good/escaped_pipes.feature.tokens	2017-03-22 12:51:02.000000000 +0000
@@ -4,11 +4,11 @@
 (4:1)Other://
 (5:3)ScenarioLine:Scenario/They are the future/
 (6:5)StepLine:Given /they have arrived/
-(7:7)TableRow://9:æ,13:o
-(8:7)TableRow://9:a,13:ø
+(7:7)TableRow://9:?,13:o
+(8:7)TableRow://9:a,13:?
 (9:5)StepLine:Given /they have arrived/
-(10:7)TableRow://9:|æ\n,22:\o
+(10:7)TableRow://9:|?\n,22:\o
 o\
-(11:7)TableRow://9:\|a\\n,22:ø\
-ø\
+(11:7)TableRow://9:\|a\\n,22:?\
+?\
 EOF
make: *** [acceptance/testdata/good/escaped_pipes.feature.tokens] Error 1
make: *** Deleting file `acceptance/testdata/good/escaped_pipes.feature.tokens'

This can also be seen on Travis.
Possible Solution
Not sure
Steps to Reproduce (for bugs)
First, install mingw-w64 as described in CONTRIBUTING.md
git clean -dfx gherkin/c
make CC=i686-w64-mingw32-gcc

Context & Motivation
The main reason I want this to pass is to use Travis to build distributable binaries for end users.
I'm not certain there is a problem with the gherkin.exe being built, as I haven't tried to run it on a Windows machine. It could be that this is a bug in Wine. It could also be a bug in the compiler or libraries used by mingw-w64. We'd have to test this manually on Windows to find out I suppose.
Your Environment

Version used: HEAD of master
Operating System and version: OS X 10.11.6 (15G31) with wine-2.0 (installed with homebrew)

Duplicate issue #140: gherkin: fix build on 
Created: 2017-03-15T23:05:52Z
The build passes on gcc and clang but fails on i686-w64-mingw32-gcc.
The compilations of bin/gherkin.exe works, and most tests pass (running on wine) except the ones that use .feature input files with non-ASCII characters (using latin characters and emoji)

Closing comment (2017-04-02T20:19:32Z): Dupe of #168