Commit 08b93a83 authored by Simon Stieger's avatar Simon Stieger

Spell "npm" with lowercase letters in package registry area

- Rename translation identifiers containing "NPM"
- Rename string occurrences of "NPM" in package registry related
  frontend and backend tests
parent 65cd1cc5
...@@ -71,7 +71,7 @@ export const PACKAGE_TYPES = [ ...@@ -71,7 +71,7 @@ export const PACKAGE_TYPES = [
type: PackageType.MAVEN, type: PackageType.MAVEN,
}, },
{ {
title: s__('PackageRegistry|NPM'), title: s__('PackageRegistry|npm'),
type: PackageType.NPM, type: PackageType.NPM,
}, },
{ {
......
...@@ -14,7 +14,7 @@ export const getPackageTypeLabel = (packageType) => { ...@@ -14,7 +14,7 @@ export const getPackageTypeLabel = (packageType) => {
case PackageType.MAVEN: case PackageType.MAVEN:
return s__('PackageType|Maven'); return s__('PackageType|Maven');
case PackageType.NPM: case PackageType.NPM:
return s__('PackageType|NPM'); return s__('PackageType|npm');
case PackageType.NUGET: case PackageType.NUGET:
return s__('PackageType|NuGet'); return s__('PackageType|NuGet');
case PackageType.PYPI: case PackageType.PYPI:
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
= f.label :maven_max_file_size, _('Maximum Maven package file size in bytes'), class: 'label-bold' = f.label :maven_max_file_size, _('Maximum Maven package file size in bytes'), class: 'label-bold'
= f.number_field :maven_max_file_size, class: 'form-control gl-form-input' = f.number_field :maven_max_file_size, class: 'form-control gl-form-input'
.form-group .form-group
= f.label :npm_max_file_size, _('Maximum NPM package file size in bytes'), class: 'label-bold' = f.label :npm_max_file_size, _('Maximum npm package file size in bytes'), class: 'label-bold'
= f.number_field :npm_max_file_size, class: 'form-control gl-form-input' = f.number_field :npm_max_file_size, class: 'form-control gl-form-input'
.form-group .form-group
= f.label :nuget_max_file_size, _('Maximum NuGet package file size in bytes'), class: 'label-bold' = f.label :nuget_max_file_size, _('Maximum NuGet package file size in bytes'), class: 'label-bold'
......
---
title: Spell "npm" with lowercase letters in Package Registry UI
merge_request: 54163
author: Simon Stieger @sim0
type: other
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
.form-check .form-check
= f.check_box :npm_package_requests_forwarding, class: 'form-check-input' = f.check_box :npm_package_requests_forwarding, class: 'form-check-input'
= f.label :npm_package_requests_forwarding, class: 'form-check-label' do = f.label :npm_package_requests_forwarding, class: 'form-check-label' do
Enable forwarding of NPM package requests to npmjs.org Enable forwarding of npm package requests to npmjs.org
.form-text.text-muted .form-text.text-muted
= _("When enabled, if an NPM package isn't found in the GitLab Registry, we will attempt to pull from the global NPM registry.") = _("When enabled, if an npm package isn't found in the GitLab Registry, we will attempt to pull from the global npm registry.")
= f.submit _('Save changes'), class: 'btn gl-button btn-success' = f.submit _('Save changes'), class: 'btn gl-button btn-success'
...@@ -250,7 +250,7 @@ RSpec.describe 'Admin updates EE-only settings' do ...@@ -250,7 +250,7 @@ RSpec.describe 'Admin updates EE-only settings' do
it 'allows you to change the npm_forwaring setting' do it 'allows you to change the npm_forwaring setting' do
page.within('#js-package-settings') do page.within('#js-package-settings') do
check 'Enable forwarding of NPM package requests to npmjs.org' check 'Enable forwarding of npm package requests to npmjs.org'
click_button 'Save' click_button 'Save'
end end
......
...@@ -18272,9 +18272,6 @@ msgstr "" ...@@ -18272,9 +18272,6 @@ msgstr ""
msgid "Maximum Maven package file size in bytes" msgid "Maximum Maven package file size in bytes"
msgstr "" msgstr ""
msgid "Maximum NPM package file size in bytes"
msgstr ""
msgid "Maximum NuGet package file size in bytes" msgid "Maximum NuGet package file size in bytes"
msgstr "" msgstr ""
...@@ -18332,6 +18329,9 @@ msgstr "" ...@@ -18332,6 +18329,9 @@ msgstr ""
msgid "Maximum lifetime allowable for Personal Access Tokens is active, your expire date must be set before %{maximum_allowable_date}." msgid "Maximum lifetime allowable for Personal Access Tokens is active, your expire date must be set before %{maximum_allowable_date}."
msgstr "" msgstr ""
msgid "Maximum npm package file size in bytes"
msgstr ""
msgid "Maximum number of %{name} (%{count}) exceeded" msgid "Maximum number of %{name} (%{count}) exceeded"
msgstr "" msgstr ""
...@@ -21314,9 +21314,6 @@ msgstr "" ...@@ -21314,9 +21314,6 @@ msgstr ""
msgid "PackageRegistry|Maven XML" msgid "PackageRegistry|Maven XML"
msgstr "" msgstr ""
msgid "PackageRegistry|NPM"
msgstr ""
msgid "PackageRegistry|NuGet" msgid "PackageRegistry|NuGet"
msgstr "" msgstr ""
...@@ -21401,6 +21398,9 @@ msgstr "" ...@@ -21401,6 +21398,9 @@ msgstr ""
msgid "PackageRegistry|You may also need to setup authentication using an auth token. %{linkStart}See the documentation%{linkEnd} to find out more." msgid "PackageRegistry|You may also need to setup authentication using an auth token. %{linkStart}See the documentation%{linkEnd} to find out more."
msgstr "" msgstr ""
msgid "PackageRegistry|npm"
msgstr ""
msgid "PackageRegistry|npm command" msgid "PackageRegistry|npm command"
msgstr "" msgstr ""
...@@ -21422,15 +21422,15 @@ msgstr "" ...@@ -21422,15 +21422,15 @@ msgstr ""
msgid "PackageType|Maven" msgid "PackageType|Maven"
msgstr "" msgstr ""
msgid "PackageType|NPM"
msgstr ""
msgid "PackageType|NuGet" msgid "PackageType|NuGet"
msgstr "" msgstr ""
msgid "PackageType|PyPI" msgid "PackageType|PyPI"
msgstr "" msgstr ""
msgid "PackageType|npm"
msgstr ""
msgid "Packages" msgid "Packages"
msgstr "" msgstr ""
...@@ -33199,7 +33199,7 @@ msgstr "" ...@@ -33199,7 +33199,7 @@ msgstr ""
msgid "When enabled, any user visiting %{host} will be able to create an account." msgid "When enabled, any user visiting %{host} will be able to create an account."
msgstr "" msgstr ""
msgid "When enabled, if an NPM package isn't found in the GitLab Registry, we will attempt to pull from the global NPM registry." msgid "When enabled, if an npm package isn't found in the GitLab Registry, we will attempt to pull from the global npm registry."
msgstr "" msgstr ""
msgid "When enabled, users cannot use GitLab until the terms have been accepted." msgid "When enabled, users cannot use GitLab until the terms have been accepted."
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module QA module QA
RSpec.describe 'Package', :orchestrated, :packages do RSpec.describe 'Package', :orchestrated, :packages do
describe 'NPM registry' do describe 'npm registry' do
include Runtime::Fixtures include Runtime::Fixtures
let(:registry_scope) { project.group.sandbox.path } let(:registry_scope) { project.group.sandbox.path }
...@@ -31,7 +31,7 @@ module QA ...@@ -31,7 +31,7 @@ module QA
{ {
"name": "#{package_name}", "name": "#{package_name}",
"version": "1.0.0", "version": "1.0.0",
"description": "Example package for GitLab NPM registry", "description": "Example package for GitLab npm registry",
"publishConfig": { "publishConfig": {
"@#{registry_scope}:registry": "#{gitlab_address_with_port}/api/v4/projects/#{project.id}/packages/npm/" "@#{registry_scope}:registry": "#{gitlab_address_with_port}/api/v4/projects/#{project.id}/packages/npm/"
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module QA module QA
RSpec.describe 'Geo', :orchestrated, :geo do RSpec.describe 'Geo', :orchestrated, :geo do
describe 'NPM registry' do describe 'npm registry' do
include Runtime::Fixtures include Runtime::Fixtures
let(:uri) { URI.parse(Runtime::Scenario.gitlab_address) } let(:uri) { URI.parse(Runtime::Scenario.gitlab_address) }
...@@ -15,7 +15,7 @@ module QA ...@@ -15,7 +15,7 @@ module QA
let(:project) do let(:project) do
Resource::Project.fabricate_via_api! do |project| Resource::Project.fabricate_via_api! do |project|
project.name = 'geo-npm-package-project' project.name = 'geo-npm-package-project'
project.description = 'Geo project for NPM package replication test' project.description = 'Geo project for npm package replication test'
end end
end end
...@@ -32,7 +32,7 @@ module QA ...@@ -32,7 +32,7 @@ module QA
{ {
"name": "#{package_name}", "name": "#{package_name}",
"version": "#{version}", "version": "#{version}",
"description": "Example package for GitLab NPM registry", "description": "Example package for GitLab npm registry",
"publishConfig": { "publishConfig": {
"@#{registry_scope}:registry": "#{gitlab_address_with_port}/api/v4/projects/#{project.id}/packages/npm/" "@#{registry_scope}:registry": "#{gitlab_address_with_port}/api/v4/projects/#{project.id}/packages/npm/"
} }
...@@ -53,7 +53,7 @@ module QA ...@@ -53,7 +53,7 @@ module QA
end end
# Test code is based on qa/specs/features/browser_ui/5_package/npm_registry_spec.rb # Test code is based on qa/specs/features/browser_ui/5_package/npm_registry_spec.rb
it 'replicates NPM registry to secondary Geo site', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1026' do it 'replicates npm registry to secondary Geo site', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1026' do
# Use a Node Docker container to publish the package # Use a Node Docker container to publish the package
with_fixtures([npmrc, package_json]) do |dir| with_fixtures([npmrc, package_json]) do |dir|
Service::DockerRun::NodeJs.new(dir).publish! Service::DockerRun::NodeJs.new(dir).publish!
......
...@@ -99,7 +99,7 @@ describe('Getters PackageDetails Store', () => { ...@@ -99,7 +99,7 @@ describe('Getters PackageDetails Store', () => {
packageEntity | expectedResult packageEntity | expectedResult
${conanPackage} | ${'Conan'} ${conanPackage} | ${'Conan'}
${packageWithoutBuildInfo} | ${'Maven'} ${packageWithoutBuildInfo} | ${'Maven'}
${npmPackage} | ${'NPM'} ${npmPackage} | ${'npm'}
${nugetPackage} | ${'NuGet'} ${nugetPackage} | ${'NuGet'}
${pypiPackage} | ${'PyPI'} ${pypiPackage} | ${'PyPI'}
`(`package type`, ({ packageEntity, expectedResult }) => { `(`package type`, ({ packageEntity, expectedResult }) => {
...@@ -168,13 +168,13 @@ describe('Getters PackageDetails Store', () => { ...@@ -168,13 +168,13 @@ describe('Getters PackageDetails Store', () => {
}); });
describe('npm string getters', () => { describe('npm string getters', () => {
it('gets the correct npmInstallationCommand for NPM', () => { it('gets the correct npmInstallationCommand for npm', () => {
setupState({ packageEntity: npmPackage }); setupState({ packageEntity: npmPackage });
expect(npmInstallationCommand(state)(NpmManager.NPM)).toBe(npmInstallStr); expect(npmInstallationCommand(state)(NpmManager.NPM)).toBe(npmInstallStr);
}); });
it('gets the correct npmSetupCommand for NPM', () => { it('gets the correct npmSetupCommand for npm', () => {
setupState({ packageEntity: npmPackage }); setupState({ packageEntity: npmPackage });
expect(npmSetupCommand(state)(NpmManager.NPM)).toBe(npmSetupStr); expect(npmSetupCommand(state)(NpmManager.NPM)).toBe(npmSetupStr);
......
...@@ -35,7 +35,7 @@ describe('Packages shared utils', () => { ...@@ -35,7 +35,7 @@ describe('Packages shared utils', () => {
packageType | expectedResult packageType | expectedResult
${'conan'} | ${'Conan'} ${'conan'} | ${'Conan'}
${'maven'} | ${'Maven'} ${'maven'} | ${'Maven'}
${'npm'} | ${'NPM'} ${'npm'} | ${'npm'}
${'nuget'} | ${'NuGet'} ${'nuget'} | ${'NuGet'}
${'pypi'} | ${'PyPI'} ${'pypi'} | ${'PyPI'}
${'composer'} | ${'Composer'} ${'composer'} | ${'Composer'}
......
...@@ -30,8 +30,8 @@ RSpec.describe 'admin/application_settings/_package_registry' do ...@@ -30,8 +30,8 @@ RSpec.describe 'admin/application_settings/_package_registry' do
expect(rendered).to have_field('Maximum Maven package file size in bytes', type: 'number') expect(rendered).to have_field('Maximum Maven package file size in bytes', type: 'number')
expect(page.find_field('Maximum Maven package file size in bytes').value).to eq(default_plan_limits.maven_max_file_size.to_s) expect(page.find_field('Maximum Maven package file size in bytes').value).to eq(default_plan_limits.maven_max_file_size.to_s)
expect(rendered).to have_field('Maximum NPM package file size in bytes', type: 'number') expect(rendered).to have_field('Maximum npm package file size in bytes', type: 'number')
expect(page.find_field('Maximum NPM package file size in bytes').value).to eq(default_plan_limits.npm_max_file_size.to_s) expect(page.find_field('Maximum npm package file size in bytes').value).to eq(default_plan_limits.npm_max_file_size.to_s)
expect(rendered).to have_field('Maximum NuGet package file size in bytes', type: 'number') expect(rendered).to have_field('Maximum NuGet package file size in bytes', type: 'number')
expect(page.find_field('Maximum NuGet package file size in bytes').value).to eq(default_plan_limits.nuget_max_file_size.to_s) expect(page.find_field('Maximum NuGet package file size in bytes').value).to eq(default_plan_limits.nuget_max_file_size.to_s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment